/* Broadcast Button Styling */
.create-broadcast-btn {
  background: linear-gradient(135deg, #9c27b0 0%, #90559a 100%);
  color: rgb(255, 255, 255);
  border: none;
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center; 
  align-items: center;
  gap: 8px;
}

.create-broadcast-btn:hover {
  background: linear-gradient(135deg, #7b1fa2 0%, #ce93d8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

/* Broadcast Ticket Cards - Purple Border */
.ticket-card.broadcast-ticket {
  border-left: 4px solid #9c27b0;
  position: relative;
}

.ticket-card.broadcast-ticket::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 16px;
  z-index: 10;
}

/* Broadcast Modal Styling
   Single scroll layer: the overlay (.broadcast-modal) scrolls.
   The inner .modal-content is a plain block — no height cap, no overflow-y.
   This means there are zero nested scroll containers and nothing can be
   hidden behind a sticky/fixed bar. */
.broadcast-modal {
  /* overlay fills the viewport and scrolls as one unit */
  align-items: flex-start !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 16px 0 32px !important; /* bottom pad for comfortable scroll room */
  box-sizing: border-box !important;
}
.broadcast-modal .modal-content {
  width: 95%;
  max-width: 700px;
  /* NO max-height, NO overflow-y — let the overlay do all scrolling */
  max-height: none !important;
  overflow: visible !important;
  margin: 0 auto;
}

.broadcast-modal h2 {
  color: #9c27b0;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Product List Styling */
.products-container {
  margin-bottom: 16px;
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background-color: #fafafa;
}

.product-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  position: relative;
  transition: box-shadow 0.2s;
}

.product-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.product-number {
  background: #9c27b0;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.drag-handle {
  cursor: grab;
  color: #999;
  font-size: 16px;
  padding: 5px;
}

.drag-handle:active {
  cursor: grabbing;
}

.remove-product {
  background: #dc3545;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-product:hover {
  background: #c82333;
}

.product-fields {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.product-link-input {
  grid-column: 1;
}

.product-link-input input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.product-link-input input:focus {
  border-color: #9c27b0;
  outline: none;
  box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.2);
}

.product-image-upload {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.image-upload-btn {
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 6px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 20px;
  color: #fcfbfc;
}

.image-upload-btn:hover {
  border-color: #9c27b0;
  color: #9c27b0;
  background: #f3e5f5;
}

.image-upload-btn.has-image {
  border-color: #28a745;
  background: #d4edda;
  color: #155724;
}

.product-image-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid #28a745;
}

.product-description {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.product-description textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-height: 50px;
  resize: vertical;
}

.product-description textarea:focus {
  border-color: #9c27b0;
  outline: none;
  box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.2);
}

/* Add Product Button */
.add-product-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 15px auto 0;
  transition: background-color 0.2s;
}

.add-product-btn:hover {
  background: #218838;
}

.add-product-btn:disabled {
  background: #fcfbfc;
  cursor: not-allowed;
}

/* Broadcast Settings */
.broadcast-settings {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 15px;
  margin-bottom: 20px;
  align-items: end;
}

.broadcast-settings .form-group {
  margin-bottom: 0;
}

.on-sale-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.on-sale-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* Intro Text */
.intro-text-container {
  margin-bottom: 10px;
}

.intro-text-container textarea {
  width: 100%;
  padding: 2px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  min-height: 20px;
  resize: vertical;
}

.intro-text-container textarea:focus {
  border-color: #9c27b0;
  outline: none;
  box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.2);
}

/* Closing Text (freeform text/link appended once at the very end) */
.shared-link-container {
  margin-bottom: 16px;
}

.shared-link-container label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 14px;
}

.shared-link-container textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  min-height: 20px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}

.shared-link-container textarea:focus {
  border-color: #9c27b0;
  outline: none;
  box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.2);
}

.shared-link-hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* Preview Section */
.preview-container {
  margin-bottom: 20px;
}

.preview-content {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 15px;
  font-family: 'Georgia', serif;
  line-height: 1.6;
  white-space: pre-line;
  max-height: 200px;
  overflow-y: auto;
}



.create-broadcast-btn {
  background: linear-gradient(135deg, #9c27b0 0%, #b984c4 100%);
  color: rgb(255, 255, 255);
  border: none;
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center; 
  align-items: center;
  gap: 8px;
}

.preview-content::-webkit-scrollbar {
  width: 6px;
}

.preview-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.preview-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* Draft Indicator */
.draft-indicator {
  background: #ffc107;
  color: #856404;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
}

/* Copy Button */
.copy-content-btn {
  background: #17a2b8;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s;
}

.copy-content-btn:hover {
  background: #138496;
}

.copy-success {
  background: #28a745 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .broadcast-modal .modal-content {
    width: 98%;
    padding: 15px;
  }
  
  .broadcast-settings {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .product-fields {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .product-image-upload {
    grid-column: 1;
    flex-direction: row;
    justify-content: flex-start;
  }
  
  .image-upload-btn {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }
  
  .product-image-preview {
    width: 50px;
    height: 50px;
  }
  
  .products-list {
    max-height: none;
  }
  
  .create-broadcast-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .product-item {
    padding: 12px;
  }
  
  .product-header {
    margin-bottom: 8px;
  }
  
  .product-number {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  
  .remove-product {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  
  .image-upload-btn {
    width: 45px;
    height: 45px;
    font-size: 14px;
  }
  
  .product-image-preview {
    width: 45px;
    height: 45px;
  }
}

/* Add this to your stylesheet */
.product-description {
  display: flex; /* Makes the children (number and textarea) align horizontally */
  align-items: center; /* Vertically aligns the number with the textarea */
  gap: 10px; /* Adds space between the number and the textarea */
}

.product-description textarea {
  flex-grow: 1; /* Allows the textarea to take up the remaining space */
}

.product-number {
  min-width: 25px; /* Ensures the number doesn't get too small */
  text-align: center;
  font-weight: bold;
}
/* Update the product item and header to use flexbox for better alignment */
.product-item {
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  background-color: #f9f9f9;
  position: relative;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Aligns the delete button to the top right */
  margin-bottom: 10px;
}

.product-info-left {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between number and description */
}

/* Update the product number and remove drag handle styles */
.product-number {
  font-weight: bold;
  font-size: 1.1em;
  color: #ffffff;
  padding: 5px; /* Add some padding for better visual spacing */
}

/* Remove the drag handle from the CSS */
.drag-handle {
  display: none;
}

/* Align the description and link inputs */
.product-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-description {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-description textarea {
  flex-grow: 1;
  width: auto; /* Allow flex-grow to manage the width */
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  height: 40px;
}

.product-link-and-image {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-link-input {
  flex-grow: 1;
}

/* Ensure the image upload button is a fixed size and in line */
.product-image-upload {
  display: flex; /* Flexbox for the upload button and preview */
  align-items: center;
  gap: 5px;
}

.image-upload-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px dashed #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  cursor: pointer;
  color: #aaa;
  transition: all 0.2s;
}

.product-image-preview {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Update the product item container */
.product-item {
  position: relative;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  background-color: #f9f9f9;
  display: flex; /* Use flexbox to position the content and delete button */
  align-items: flex-start;
  gap: 10px;
}

/* Flex container for all main product fields */
.product-content-wrapper {
  flex-grow: 1; /* Allows the content to fill the remaining space */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Row for the number, description, and image upload */
.product-info-top {
  display: flex;
  align-items: flex-start; /* Align all items to the top */
  gap: 10px;
}

.product-number {
  flex-shrink: 0; /* Prevents the number from shrinking */
  font-weight: bold;
  font-size: 1.1em;
  color: #ffffff;
  padding-top: 5px; /* Adjust padding to align with the textarea */
}

.product-info-top textarea {
  flex-grow: 1; /* Allows the textarea to take up all available space */
  min-height: 40px;
  resize: none;
  overflow: hidden;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  box-sizing: border-box;
}

/* Image upload button */
.product-image-upload {
  flex-shrink: 0; /* Prevents the button from shrinking */
  display: flex;
  align-items: center;
}

.image-upload-btn {
  width: 40px;
  height: 40px;
  border: 1px dashed #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  cursor: pointer;
  color: #aaa;
  transition: all 0.2s;
}

.product-image-preview {
  position: absolute; /* Position the preview over the button to save space */
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
  right: 10px; /* Adjust as needed */
  bottom: 10px; /* Adjust as needed */
  z-index: 10;
}

/* Link input at the bottom */
.product-link-input input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Remove button positioned to the right of the entire product card */
.remove-product {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #dc3545;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

/* This is no longer needed in the HTML, but good to keep in your CSS to remove old styles */
.product-header {
  display: none;
}


/* This rule targets the title, intro text, product description, and link inputs in the broadcast modal */
#broadcastModal input[type="text"],
#broadcastModal textarea {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}

/* This rule specifically targets the preview area of the broadcast modal */
#previewContent {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
}

/* Additional styles for broadcast image handling */
.image-upload-btn.uploading {
  opacity: 0.6;
  pointer-events: none;
}

.product-image-preview {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
  margin-left: 5px;
}

.product-image-preview:hover {
  transform: scale(1.1);
}

/* Make the image upload area more clickable */
.product-image-upload {
  display: flex;
  align-items: center;
  gap: 5px;
}

.image-upload-btn {
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
  min-width: 30px;
  text-align: center;
}

.image-upload-btn:hover {
  background-color: rgba(0,0,0,0.1);
}





/* Align the link input with the description box above */
.product-link-input {
  margin-left: 36px; /* This should match the width of the number circle + gap */
  margin-top: 8px;
}

.product-link-input input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  /* Existing styles for mobile */

  .form-actions {
    display: flex; /* Use flexbox to align buttons */
    justify-content: space-around; /* Distribute space evenly */
    align-items: center; /* Vertically align items */
  }

  .form-actions button {
    flex: 1; /* Allow buttons to grow and fill space */
    margin: 0 5px; /* Add some horizontal spacing */
  }
}




.preview-container {
  display: none;
}

#broadcastNotes {
  width: 100%;
  min-height: 60px;
  height: 60px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

.copy-content-section {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

.copy-content-section .copy-content-btn {
  background-color: #17a2b8;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.copy-content-section .copy-content-btn:hover {
  background-color: #138496;
}

.copy-content-section .copy-content-btn:active {
  transform: translateY(1px);
}

.copy-content-section .copy-content-btn.copy-success {
  background-color: #28a745;
}

/* Remove any existing on-sale checkbox styles if they exist */
.on-sale-checkbox {
  display: none;
}
/* ── Teaser Prompt Row ── */
.broadcast-prompt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #f5f0eb;
  border-radius: 8px;
  border: 1px solid #e5ddd5;
}
.broadcast-prompt-row label {
  font-size: 13px;
  font-weight: 600;
  color: #7a6855;
  white-space: nowrap;
}
.broadcast-prompt-row select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #d6c9bb;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #3e342a;
}

/* ── Product number column with wand ── */
.product-number-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Drag handle for reordering products ── */
.product-drag-handle {
  cursor: grab;
  color: #b0a89c;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.product-drag-handle svg { display: block; }
.product-drag-handle:hover { color: #6b5540; }
.product-drag-handle:active { cursor: grabbing; }

.product-item.product-sortable-chosen {
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.product-item.product-sortable-drag {
  opacity: 0.9;
}
.product-item.product-sortable-ghost {
  opacity: 0.4;
  background: #f0e8dc;
}

/* ── Description column ── */
.product-description-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* ── Auto-grow product description textarea ── */
.product-desc-textarea {
  width: 100%;
  min-height: 38px;
  resize: none;
  overflow: hidden;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  box-sizing: border-box;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.45;
  transition: border-color 0.15s;
}
.product-desc-textarea:focus {
  border-color: #BB5D4C;
  outline: none;
}

/* ── Teaser row below description ── */
.product-teaser-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 8px;
  background: #fff8f0;
  border: 1px solid #e8ddd0;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
}
.product-teaser-row.hidden { display: none; }
.teaser-label {
  font-weight: 700;
  color: #BB5D4C;
  white-space: nowrap;
  font-family: 'Courier New', Courier, monospace;
}
.teaser-text {
  color: #4a3728;
  font-family: 'Courier New', Courier, monospace;
}

/* ── Wand button ── */
.wand-btn {
  background: none;
  border: 1px solid #d6c9bb;
  border-radius: 6px;
  padding: 3px 5px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
  color: inherit;
}
.wand-btn:hover {
  background: #f5f0eb;
  border-color: #BB5D4C;
}
.wand-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Larger thumbnail ── */
.image-upload-btn {
  width: 64px !important;
  height: 64px !important;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  cursor: pointer;
  color: #aaa;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.image-upload-btn.has-image {
  border-style: solid;
  border-color: #BB5D4C;
}
.image-upload-btn .product-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0;
}

/* ── Overrides for revised product card layout ── */

/* Link input: compact, truncated on right, with a popout-to-new-tab button */
.product-link-input {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-link-input input {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  color: #7a6855;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-link-open-btn {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  color: #7a6855;
}
.product-link-open-btn:hover:not(:disabled) {
  background: #f2ebe0;
  border-color: #9c27b0;
  color: #9c27b0;
}
.product-link-open-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Portrait thumbnail: taller than wide */
.image-upload-btn {
  width: 58px !important;
  height: 78px !important;
}
.image-upload-btn .product-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0;
}

/* Dim wand when no image */
.wand-btn.wand-disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Hide old teaser row styles -- teaser now goes into textarea */
.product-teaser-row { display: none !important; }

/* ── Thumbnail orientation fixes ── */
.image-upload-btn {
  width: 64px !important;
  height: 88px !important;  /* taller portrait ratio */
  background: #f0f0f0 !important; /* neutral fallback, not green */
}
.image-upload-btn.has-image {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 8px;
  overflow: hidden;
}
.image-upload-btn .product-image-preview,
.image-upload-btn img.product-image-preview {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: top center !important; /* show tops of fashion shots, not waists */
  border-radius: 6px;
  display: block !important;
  margin: 0 !important;
  position: relative !important; /* override any absolute positioning */
  inset: auto !important;
}

/* ── Fix textarea auto-grow (override fixed height) ── */
.product-info-top textarea,
.product-desc-textarea {
  height: auto !important;
  min-height: 38px !important;
  overflow: hidden !important;
}

/* ── X button: above thumbnail, not overlapping it ── */
.product-image-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
/* Move remove-product out of absolute positioning into the image column flow */
.remove-product {
  position: static !important;
  top: auto !important;
  right: auto !important;
  background: #dc3545 !important;
  color: #fff !important;
  border: none !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  font-size: 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  align-self: center !important;
  line-height: 1 !important;
}

/* ── Drag-and-drop thumbnail target ── */
.image-upload-btn.drag-over {
  border-color: #BB5D4C !important;
  border-style: solid !important;
  background: rgba(187, 93, 76, 0.12) !important;
  transform: scale(1.05);
  transition: transform 0.1s, background 0.1s;
}

/* ── Intro text label row with wand ── */
.intro-text-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.intro-text-label-row label { margin: 0; }

/* ── iOS textarea auto-grow fix ── */
.product-desc-textarea {
  box-sizing: border-box !important;
  -webkit-box-sizing: border-box !important;
}

/* ── iOS fix: font-size 16px prevents auto-zoom on input focus ── */
/* ── Also removes fixed heights that block textarea auto-grow  ── */
.broadcast-modal input[type="text"],
.broadcast-modal input[type="date"],
.broadcast-modal textarea,
.broadcast-modal select {
  font-size: 16px !important;
  -webkit-text-size-adjust: 100%;
}
/* Keep Courier feel but at 16px */
.broadcast-modal textarea,
.broadcast-modal .product-desc-textarea,
#introText,
#broadcastTitle {
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 16px !important;
}
/* Remove any fixed heights that fight auto-grow */
.broadcast-modal textarea,
.broadcast-modal .product-desc-textarea,
#introText {
  min-height: 40px;
}


/* ── Mobile: smaller font + taller fixed boxes ── */
@media (max-width: 768px) {
  /* Keep 16px for iOS no-zoom, but compress visually with tighter line-height */
  .broadcast-modal textarea,
  .broadcast-modal .product-desc-textarea,
  #introText {
    font-size: 16px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.3px;
  }

  /* Allow auto-grow to work on mobile */
  #introText,
  .product-desc-textarea {
    height: auto !important;
    overflow-y: hidden !important;
    resize: none !important;
  }
}

/* ── Product description mobile override ── */
@media (max-width: 768px) {
  .product-desc-textarea {
    font-size: 13px !important;
    height: auto !important;
  }
}

/* ── Collapsed top line: date | title | copy ── */
.broadcast-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.topline-date {
  flex: 0 0 auto;
  font-size: 16px !important;
  padding: 6px 8px;
  border: 1px solid #d6c9bb;
  border-radius: 6px;
  background: #fff;
  color: #3e342a;
  cursor: pointer;
}
.topline-title {
  flex: 1 1 0;
  min-width: 0;
  font-size: 16px !important;
  font-family: 'Courier New', Courier, monospace !important;
  padding: 6px 8px;
  border: 1px solid #d6c9bb;
  border-radius: 6px;
  background: #fff;
  color: #3e342a;
}
.topline-copy {
  flex: 0 0 auto;
  background: none;
  border: 1px solid #d6c9bb;
  border-radius: 6px;
  font-size: 22px;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s;
}
.topline-copy:hover { background: #f5f0eb; }

/* ── Product desc: smaller font, mobile and desktop ── */
.product-desc-textarea {
  font-size: 12px !important;
  height: auto !important;
  overflow-y: hidden !important;
  resize: none !important;
  line-height: 1.4 !important;
}
@media (max-width: 768px) {
  .product-desc-textarea {
    font-size: 12px !important;
    height: auto !important;
  }
}
