/* =============================================
   COLLABS PAGE STYLES
   ============================================= */

.collabs-dashboard {
  max-width: 700px;
  margin: 0 auto;
  padding: 16px 16px 100px;
}

/* ---- Ticket Selector ---- */
.collabs-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.collabs-header h1 {
  font-size: 1.4rem;
  color: #4a3728;
  margin: 0;
  flex: none;
}

.ticket-select-wrap {
  flex: 1;
  min-width: 180px;
}

.ticket-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d4c5b0;
  border-radius: 8px;
  background: #fffdf9;
  color: #4a3728;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a6855' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.ticket-select:focus {
  outline: none;
  border-color: #7a6855;
  box-shadow: 0 0 0 2px rgba(122, 104, 85, 0.15);
}

/* ---- Brand Bar ---- */
.brand-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.brand-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #a5876c;
  border: 1px solid #8a6d54;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.brand-btn:hover {
  background: #93745c;
}
.brand-btn.active {
  background: #7a6855;
  box-shadow: 0 0 0 2px rgba(122, 104, 85, 0.35);
}

.brand-edit-icon {
  font-size: 12px;
  opacity: 0.75;
  padding: 2px;
  border-radius: 4px;
}
.brand-edit-icon:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.brand-new-btn {
  background: #fffdf9;
  border: 1px dashed #d4c5b0;
  color: #a08060;
}
.brand-new-btn:hover {
  background: #fdf6ee;
  border-color: #BB5D4C;
  color: #BB5D4C;
}

.copy-all-btn-brandbar {
  margin-left: auto;
  margin-bottom: 0;
}

/* More dropdown */
.brand-more-wrap {
  position: relative;
}

.brand-more-caret {
  font-size: 10px;
  transition: transform 0.15s;
}
.brand-more-btn.open .brand-more-caret {
  transform: rotate(180deg);
}

.brand-more-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  background: #fffdf9;
  border: 1px solid #e8ddd0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(74, 55, 40, 0.18);
  padding: 6px;
  z-index: 100;
}
.brand-more-dropdown.hidden { display: none; }

.brand-more-empty {
  padding: 10px 8px;
  font-size: 13px;
  color: #b0998a;
}

.brand-more-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
}
.brand-more-row:hover {
  background: #f5efe6;
}

.brand-more-row-name {
  flex: 1;
  background: none;
  border: none;
  text-align: left;
  padding: 7px 8px;
  font-size: 14px;
  font-family: inherit;
  color: #4a3728;
  cursor: pointer;
  border-radius: 6px;
}
.brand-more-row-name:hover {
  color: #BB5D4C;
}
.brand-more-row.active .brand-more-row-name {
  font-weight: 700;
  color: #7a6855;
}

.brand-more-row-icon-btn {
  background: none;
  border: none;
  color: #a08060;
  font-size: 13px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.brand-more-row-icon-btn:hover {
  background: #eee2d3;
}
.brand-more-row-icon-btn.delete:hover {
  background: #fdecea;
  color: #c0392b;
}

/* ---- No Ticket Selected State ---- */
.collabs-empty {
  text-align: center;
  padding: 50px 20px;
  color: #a08060;
}
.collabs-empty p {
  font-size: 15px;
}

/* ---- Copy All ---- */
.copy-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: #a9b4d4;
  color: #2b3350;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s;
  margin-bottom: 18px;
}
.copy-all-btn:hover { background: #97a3c9; }
.copy-all-btn.copied { background: #4a7c59; color: #fff; }

.copy-all-btn-bottom {
  display: flex;
  width: 100%;
  margin-top: 6px;
  margin-bottom: 0;
  padding: 13px;
  font-size: 15px;
  box-sizing: border-box;
}

/* ---- Collab Section Card (Reel / Stories / LTK Exclusive / extras) ---- */
.collab-section {
  background: #fffdf9;
  border: 1px solid #e8ddd0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

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

.collab-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #4a3728;
}

.collab-section-label-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  font-weight: 700;
  color: #4a3728;
  font-family: inherit;
  padding: 2px 4px;
  border-radius: 4px;
  min-width: 0;
}
.collab-section-label-input:focus {
  outline: none;
  background: #f5efe6;
}

.collab-section-status {
  font-size: 12px;
  color: #a08060;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}
.collab-section-status.visible {
  opacity: 1;
}

.collab-section-delete {
  background: none;
  border: 1px solid #e8ddd0;
  border-radius: 8px;
  color: #c0392b;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 9px;
  font-family: inherit;
  flex-shrink: 0;
}
.collab-section-delete:hover {
  background: #fdecea;
  border-color: #c0392b;
}

.collab-field-label {
  font-size: 11px;
  font-weight: 700;
  color: #a08060;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 10px 0 5px;
}
.collab-field-label:first-of-type {
  margin-top: 0;
}

.collab-caption,
.collab-disclosure {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #d4c5b0;
  border-radius: 8px;
  background: #fff;
  color: #4a3728;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.collab-caption:focus,
.collab-disclosure:focus {
  outline: none;
  border-color: #7a6855;
  box-shadow: 0 0 0 2px rgba(122,104,85,0.12);
}

/* Add Section trigger */
.add-section-btn {
  display: block;
  width: 100%;
  padding: 16px 12px;
  background: #fffdf9;
  border: 2px dashed #d4c5b0;
  border-radius: 14px;
  color: #a08060;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: center;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.add-section-btn:hover {
  background: #fdf6ee;
  border-color: #BB5D4C;
  color: #BB5D4C;
}

/* ---- Modals (Brand / Add Section) ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5ded5;
}
.modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #4a3728;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 60vh;
  overflow-y: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: #7a6855;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  border: 1px solid #e5ded5;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 14px;
  color: #4a3728;
  background: #faf7f4;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
  box-sizing: border-box;
  width: 100%;
}
.form-input:focus {
  border-color: #7a6855;
  background: #fff;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e5ded5;
  flex-wrap: wrap;
}

.modal-footer-right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.cancel-btn {
  background: #f0e9de;
  color: #4a3728;
  border: 1px solid #d4c5b0;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.cancel-btn:hover {
  background: #e2d8cb;
}

.modal-delete-btn {
  background: none;
  border: 1px solid #e8ddd0;
  color: #c0392b;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.modal-delete-btn:hover {
  background: #fdecea;
  border-color: #c0392b;
}
.modal-delete-btn.hidden { display: none; }

/* Mobile tweaks */
@media (max-width: 480px) {
  .collabs-header h1 {
    font-size: 1.2rem;
  }
  .brand-bar {
    gap: 8px;
  }
  .brand-btn {
    padding: 9px 12px;
    font-size: 13px;
  }
}
