/* =============================================
   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: 20px;
  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);
}

/* ---- Word Bank ---- */
.wordbank-section {
  background: #fffdf9;
  border: 1px solid #e8ddd0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.wordbank-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.wordbank-title {
  font-size: 13px;
  font-weight: 600;
  color: #7a6855;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wordbank-toggle-icon {
  font-size: 11px;
  color: #7a6855;
  transition: transform 0.2s;
}
.wordbank-toggle-icon.open {
  transform: rotate(180deg);
}

.wordbank-body {
  margin-top: 12px;
}

.wordbank-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  min-height: 30px;
}

.wordbank-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0e9de;
  border: 1px solid #d4c5b0;
  border-radius: 20px;
  padding: 4px 10px 4px 12px;
  font-size: 13px;
  color: #4a3728;
  cursor: default;
}

.chip-delete-btn {
  background: none;
  border: none;
  color: #a08060;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}
.chip-delete-btn:hover {
  color: #c0392b;
}

.wordbank-add-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.wordbank-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #d4c5b0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #4a3728;
  font-family: inherit;
}
.wordbank-input:focus {
  outline: none;
  border-color: #7a6855;
}

.wordbank-add-btn {
  padding: 7px 14px;
  background: #7a6855;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.wordbank-add-btn:hover {
  background: #5d4f3e;
}

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

/* ---- Photos Section ---- */
.photos-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.photos-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #4a3728;
}

.add-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #BB5D4C;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.add-photo-btn:hover {
  background: #99473A;
}
.add-photo-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ---- Photo Card ---- */
.photo-card {
  background: #fffdf9;
  border: 1px solid #e8ddd0;
  border-radius: 14px;
  margin-bottom: 18px;
  overflow: hidden;
}

.photo-card-image-wrap {
  position: relative;
  width: 100%;
  background: #f5efe6;
}

.photo-card-image-wrap img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.photo-card-image-uploading {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: #7a6855;
  font-size: 14px;
}

.upload-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e8ddd0;
  border-top-color: #7a6855;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.photo-card-body {
  padding: 14px 16px;
}

.photo-label {
  font-size: 12px;
  font-weight: 600;
  color: #a08060;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

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

/* Caption block builder buttons */
.caption-blocks-label {
  font-size: 12px;
  font-weight: 600;
  color: #a08060;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 12px 0 7px;
}

.caption-block-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.block-btn {
  padding: 6px 14px;
  background: #f0e9de;
  border: 1px solid #d4c5b0;
  border-radius: 20px;
  font-size: 13px;
  color: #4a3728;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.block-btn:hover:not(:disabled) {
  background: #e2d8cb;
  border-color: #7a6855;
}
.block-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.block-btn .btn-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #d4c5b0;
  border-top-color: #7a6855;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.block-btn.loading .btn-spinner {
  display: inline-block;
}
.block-btn.loading .btn-label {
  opacity: 0.6;
}

/* Disclosure chips row on a card */
.disclosure-label {
  font-size: 12px;
  font-weight: 600;
  color: #a08060;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 12px 0 7px;
}

.disclosure-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.disclosure-chip {
  padding: 5px 12px;
  background: #eef5fb;
  border: 1px solid #b8cfe0;
  border-radius: 20px;
  font-size: 13px;
  color: #2c5f8a;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.disclosure-chip:hover {
  background: #d6eaf8;
}

/* Card action row */
.card-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid #f0e9de;
  margin-top: 4px;
}

.card-save-btn {
  flex: 1;
  padding: 8px;
  background: #7a6855;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.card-save-btn:hover {
  background: #5d4f3e;
}
.card-save-btn.saved {
  background: #4a7c59;
}

.card-copy-btn {
  flex: 1;
  padding: 8px;
  background: #f0e9de;
  color: #4a3728;
  border: 1px solid #d4c5b0;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.card-copy-btn:hover {
  background: #e2d8cb;
}

.card-delete-btn {
  padding: 8px 12px;
  background: none;
  border: 1px solid #e8ddd0;
  border-radius: 8px;
  color: #c0392b;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.card-delete-btn:hover {
  background: #fdecea;
  border-color: #c0392b;
}

/* Empty photos state */
.no-photos-msg {
  text-align: center;
  padding: 30px 20px;
  color: #b0998a;
  font-size: 14px;
  border: 2px dashed #e2d8cb;
  border-radius: 12px;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .collabs-header h1 {
    font-size: 1.2rem;
  }
  .photo-card-image-wrap img {
    max-height: 220px;
  }
}
