/* ══════════════════════════════════════
   REMIX MODAL — remixModal.css
   Follows Outlinies A.D: Cinzel/Cormorant/IM Fell English,
   warm paper palette, terra accent, corner brackets.
══════════════════════════════════════ */

/* ── Overlay ── */
.remix-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 27, 21, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(.16, 1, .3, 1);
  overflow-y: auto;
  padding: 2rem;
}
.remix-overlay.is-visible {
  opacity: 1;
}

/* ── Panel ── */
.remix-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--paper, #f4efe4);
  padding: 2.5rem;
  transform: translateY(16px);
  transition: transform 0.35s cubic-bezier(.16, 1, .3, 1);
}
.remix-overlay.is-visible .remix-panel {
  transform: translateY(0);
}

/* Corner brackets */
.remix-panel::before,
.remix-panel::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--terra, #b85c38);
  border-style: solid;
  pointer-events: none;
}
.remix-panel::before { top: 0;    left: 0;  border-width: 2px 0 0 2px; }
.remix-panel::after  { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* Close button */
.remix-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink-mid, #3a3528);
  transition: color 0.2s;
  z-index: 2;
}
.remix-close:hover { color: var(--terra, #b85c38); }

/* ── Header ── */
.remix-kicker {
  display: block;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--terra, #b85c38);
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.remix-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink, #1e1b15);
  letter-spacing: 0.08em;
  margin: 0 0 1.2rem;
  line-height: 1.3;
}

/* ── NFT Preview Area ── */
.remix-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 360px;
  margin: 0 auto 1.2rem;
  overflow: visible;
  background: var(--ink-faint, rgba(30,27,21,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
}
/* When the 3D viewer is mounted, let it control sizing */
.remix-preview.has-viewer {
  aspect-ratio: unset;
  max-height: none;
  background: none;
}
/* Static image fallback (shown until viewer loads) */
.remix-preview__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* 3D viewer fills the preview area when mounted */
.remix-preview .nv-wrapper {
  width: 100%;
}

/* ── Message ── */
.remix-message {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-mid, #3a3528);
  text-align: center;
  margin-bottom: 1.4rem;
  line-height: 1.6;
}

/* ── Form fields ── */
.remix-field {
  margin-bottom: 1rem;
}
.remix-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mid, #3a3528);
  margin-bottom: 0.35rem;
}
.remix-input,
.remix-textarea {
  width: 100%;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--ink, #1e1b15);
  background: transparent;
  border: 1px solid var(--ink-faint, rgba(30,27,21,0.12));
  padding: 0.55rem 0.75rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.remix-input:focus,
.remix-textarea:focus {
  outline: none;
  border-color: var(--terra, #b85c38);
}
.remix-textarea {
  resize: vertical;
  min-height: 60px;
}
.remix-desc-prefix {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--ink-mid, #3a3528);
  margin-bottom: 0.25rem;
  display: block;
}

/* ── Buttons ── */
.remix-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.remix-btn-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--terra, #b85c38);
  color: var(--paper, #f4efe4);
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}
.remix-btn-confirm:hover { opacity: 0.85; }
.remix-btn-confirm:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Loading spinner inside confirm button */
.remix-btn-confirm .remix-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(244,239,228,0.3);
  border-top-color: var(--paper, #f4efe4);
  border-radius: 50%;
  animation: remix-spin 0.6s linear infinite;
}
.remix-btn-confirm.is-loading .remix-spinner { display: inline-block; }
.remix-btn-confirm.is-loading .remix-btn-label { display: none; }

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

/* ── Phase transitions ── */
.remix-phase { display: none; }
.remix-phase.is-active { display: block; }

/* ── Responsive ── */
@media (max-width: 680px) {
  .remix-overlay {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 3.5rem;
  }
  .remix-panel {
    padding: 1.8rem 1.4rem;
    max-width: 100%;
  }
  .remix-title {
    font-size: 1.1rem;
  }
  .remix-preview {
    max-height: 300px;
  }
  .remix-btn-confirm {
    padding: 0.75rem 1.5rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 400px) {
  .remix-panel {
    padding: 1.4rem 1rem;
  }
  .remix-preview {
    max-height: 240px;
  }
  .remix-title {
    font-size: 1rem;
  }
}

.remix-queue-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin: 1.15rem 0 0.3rem;
}
.remix-queue-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}
.remix-step-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-faint, rgba(30,27,21,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.35s, background 0.35s;
}
.remix-step-num,
.remix-step-check {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  color: var(--ink-mid, #3a3528);
  position: absolute;
  transition: opacity 0.25s;
}
.remix-step-check {
  opacity: 0;
  color: var(--paper, #f4efe4);
  font-size: 0.78rem;
}
.remix-step-lbl {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mid, #3a3528);
}
.remix-queue-step[data-state="active"] .remix-step-circle {
  border-color: var(--terra, #b85c38);
}
.remix-queue-step[data-state="active"] .remix-step-num,
.remix-queue-step[data-state="active"] .remix-step-lbl {
  color: var(--terra, #b85c38);
}
.remix-queue-step[data-state="done"] .remix-step-circle {
  background: var(--moss, #52714a);
  border-color: var(--moss, #52714a);
}
.remix-queue-step[data-state="done"] .remix-step-num { opacity: 0; }
.remix-queue-step[data-state="done"] .remix-step-check { opacity: 1; }
.remix-queue-step[data-state="done"] .remix-step-lbl {
  color: var(--moss, #52714a);
}
.remix-queue-step[data-state="error"] .remix-step-circle {
  border-color: var(--terra, #b85c38);
}
.remix-queue-step[data-state="error"] .remix-step-num,
.remix-queue-step[data-state="error"] .remix-step-lbl {
  color: var(--terra, #b85c38);
}
.remix-queue-status {
  margin: 0;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ink-mid, #3a3528);
  text-align: center;
}

