/* ============================================================
   SERENZA · creative-line.css
   Creative line (mood board) sections and gallery.
   Requires colors_and_type.css (tokens).
   ============================================================ */

/* ---------- LÍNEA CREATIVA ---------- */
.sz-creative-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sz-creative-section__title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  margin: 0;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  min-width: 120px;
  transition: border-color .15s;
}

.sz-creative-section__title:hover,
.sz-creative-section__title:focus {
  border-color: var(--paper-deep);
  background: var(--paper-soft);
}

.sz-creative-section__title:empty::before {
  content: "Título de la sección...";
  color: var(--ink-faint);
}

.sz-creative-section__desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 4px 0 0;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  min-width: 120px;
  transition: border-color .15s;
}

.sz-creative-section__desc:hover,
.sz-creative-section__desc:focus {
  border-color: var(--paper-deep);
  background: var(--paper-soft);
}

.sz-creative-section__desc:empty::before {
  content: "Añadir descripción...";
  color: var(--ink-faint);
  font-style: italic;
}

.sz-creative-section__desc:empty:hover::before,
.sz-creative-section__desc:empty:focus::before {
  content: none;
}

.sz-creative-section--private {
  border-left: 3px solid var(--accent);
  opacity: 0.85;
}

.sz-creative-section--private .sz-creative-section__title {
  color: var(--accent);
}

/* ---------- GALLERY ---------- */

.sz-creative-gallery-wrap {
  position: relative;
}

.sz-creative-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-deep) transparent;
}

.sz-creative-gallery::-webkit-scrollbar {
  height: 6px;
}

.sz-creative-gallery::-webkit-scrollbar-track {
  background: transparent;
}

.sz-creative-gallery::-webkit-scrollbar-thumb {
  background: var(--paper-deep);
  border-radius: 3px;
}

.sz-creative-gallery__item {
  position: relative;
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--paper-deep);
  background: var(--paper-soft);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.sz-creative-gallery__item:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.sz-creative-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sz-creative-gallery__item-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.55);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .15s;
  padding: 0;
}

.sz-creative-gallery__item:hover .sz-creative-gallery__item-delete {
  opacity: 1;
}

.sz-creative-gallery__item-delete:hover {
  background: var(--danger, #c0392b);
}

.sz-creative-gallery__add {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border: 2px dashed var(--paper-deep);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
  overflow: hidden;
}

.sz-creative-gallery__add:hover {
  border-color: var(--gold);
  background: rgba(94,107,90,.04);
}

.sz-creative-gallery__add.drag-over {
  border-color: var(--gold);
  background: rgba(197,167,102,.08);
}

.sz-creative-gallery__add.drag-over svg {
  stroke: var(--gold);
}

.sz-creative-gallery__add-text {
  font-size: 28px;
  font-weight: 300;
  color: var(--ink-faint);
  line-height: 1;
}

.sz-creative-gallery__file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.sz-creative-gallery__scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--paper-deep);
  background: var(--paper);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  transition: background .15s, color .15s;
  padding: 0;
}

.sz-creative-gallery__scroll-btn:hover {
  background: var(--paper-soft);
  color: var(--ink);
}

.sz-creative-gallery__scroll-btn--left {
  left: -8px;
}

.sz-creative-gallery__scroll-btn--right {
  right: -8px;
}

.sz-creative-new-section {
  padding-top: 8px;
}

/* ── Creative section header: stack title + buttons on mobile ── */
.sz-creative-section .sz-row--between {
  flex-wrap: wrap;
}

.sz-creative-section .sz-row--between > div:last-child {
  width: 100%;
  justify-content: flex-end;
  margin-top: 8px;
}

.sz-creative-section__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .sz-creative-section .sz-row--between > div:last-child {
    width: auto;
    margin-top: 0;
  }
}

/* ── Creative new section form: fluid on mobile ── */
@media (max-width: 767px) {
  .sz-creative-new-section form {
    flex-wrap: wrap;
  }

  .sz-creative-new-section input[type="text"] {
    max-width: 100% !important;
    flex: 1 1 100%;
  }
}
