/* assets/css/poster.css - Poster tool and success page specific styles */
.poster-hero {
  text-align: center;
  padding: 44px 24px 18px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s forwards;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-sub {
  font-size: 16px;
  color: var(--text-soft);
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.7s 0.3s forwards;
}

.hero-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 0.7s 0.4s forwards;
}

.proof-text {
  color: var(--text-soft);
}

.builder {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.form-section {
  margin-bottom: 24px;
}

.field-row {
  display: grid;
  gap: 10px;
}

.field-row.two-col {
  grid-template-columns: 1fr 1fr;
}

.field {
  display: block;
}

.distance-row {
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--gold-dim);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: var(--radius);
}

.distance-auto {
  display: flex;
  align-items: center;
  gap: 10px;
}

.distance-icon {
  font-size: 18px;
  opacity: 0.7;
}

.distance-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  color: var(--gold-light);
  line-height: 1;
}

.unit-toggle {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.unit-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.unit-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold-light);
}

.distance-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.char-count {
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.poster-style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.poster-style-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.poster-style-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.poster-style-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.25) inset;
}

.poster-style-canvas {
  width: 100%;
  max-width: 120px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-softer);
  display: block;
}

.poster-style-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.poster-style-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.theme-btn {
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  position: relative;
}

.theme-btn:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.theme-btn.active {
  border-color: var(--gold);
}

.theme-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.theme-swatch-shape {
  width: 12px;
  height: 9px;
  background: #ffffff;
  clip-path: polygon(5% 78%, 14% 16%, 63% 7%, 92% 31%, 82% 72%, 56% 95%, 20% 86%);
  opacity: 0.95;
}

.theme-name {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-family: 'DM Sans', sans-serif;
}

.theme-check {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 10px;
  color: var(--gold-light);
}

.theme-grid.style-inverted .theme-btn {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.theme-grid.style-inverted .theme-btn.active {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(201, 169, 110, 0.28);
}

.theme-grid.style-inverted .theme-name {
  color: rgba(255, 255, 255, 0.92);
}

.theme-grid.style-inverted .theme-swatch {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.theme-grid.style-inverted .theme-check {
  color: #ffffff;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.style-opt {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.style-opt:hover {
  border-color: var(--border-hover);
}

.style-opt.active {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.style-icon {
  font-size: 20px;
  opacity: 0.7;
}

.style-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
}

.style-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.card-checkout-box {
  background: var(--panel-softer);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.card-checkout-container {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-softer);
  padding: 11px 12px;
  transition: var(--transition);
}

.card-checkout-container:focus-within {
  border-color: rgba(201, 169, 110, 0.45);
  background: var(--input-focus-bg);
}

.card-checkout-container iframe {
  width: 100% !important;
}

.cta-area {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 8px;
}

.cta-free {
  width: 100%;
  margin-bottom: 12px;
}

.cta-divider {
  text-align: center;
  position: relative;
  margin: 12px 0;
  font-size: 11px;
  color: var(--text-muted);
}

.cta-divider::before,
.cta-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 80px);
  height: 1px;
  background: var(--border);
}

.cta-divider::before {
  left: 0;
}

.cta-divider::after {
  right: 0;
}

.cta-price-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.price-badge {
  background: var(--gold-dim);
  border: 1px solid rgba(201, 169, 110, 0.3);
  color: var(--gold-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  padding: 2px 12px;
  border-radius: 6px;
}

.price-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.cta-paid {
  font-size: 16px;
  padding: 16px;
}

.cta-trust {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}

.preview-panel {
  position: sticky;
  top: 24px;
}

.preview-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 14px;
}

.poster-wrap {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-elevated), 0 0 0 1px var(--border);
  transition: box-shadow var(--transition-slow);
}

.poster-wrap:hover {
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(201, 169, 110, 0.12);
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}

.stat-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  color: var(--gold-light);
  line-height: 1;
}

.stat-key {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.trust-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 70px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.trust-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.trust-card h3 {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 400;
}

.trust-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.success-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px 90px;
}

.success-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-elevated);
  padding: 32px;
  text-align: center;
}

.success-check,
.pending-icon,
.error-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  font-size: 30px;
  font-family: 'Cormorant Garamond', serif;
}

.success-check {
  background: rgba(112, 196, 138, 0.15);
  border: 1px solid rgba(112, 196, 138, 0.55);
  color: var(--success);
}

.pending-icon {
  background: rgba(201, 169, 110, 0.12);
  border: 1px solid rgba(201, 169, 110, 0.4);
  color: var(--gold-light);
}

.error-icon {
  background: rgba(232, 112, 112, 0.12);
  border: 1px solid rgba(232, 112, 112, 0.45);
  color: var(--error);
}

.success-title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 300;
  line-height: 1.08;
}

.success-title em {
  color: var(--gold-light);
  font-style: italic;
}

.success-sub {
  margin: 10px 0 0;
  color: var(--text-soft);
}

.success-poster-wrap {
  width: min(460px, 100%);
  margin: 28px auto 0;
}

.order-recap {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-softer);
  padding: 16px;
  text-align: left;
}

.order-recap h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 500;
}

.order-recap-grid {
  display: grid;
  gap: 8px;
}

.order-recap-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

.order-recap-grid > div strong {
  color: var(--text);
  font-weight: 500;
}

.order-link-wrap {
  margin-top: 14px;
}

.order-link-wrap label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.order-link-row {
  display: flex;
  gap: 8px;
}

.order-link-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
}

.order-link-wrap p {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.share-section {
  margin-top: 28px;
}

.share-divider {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.share-text {
  margin: 0;
  color: var(--text-soft);
}

.share-btns {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

@keyframes drawArc {
  from {
    stroke-dashoffset: 400;
  }

  to {
    stroke-dashoffset: 0;
  }
}

.flight-arc {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: drawArc 2s ease 0.5s forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

.shake {
  animation: shake 0.4s ease;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-hover);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-large {
  width: 40px;
  height: 40px;
  border-width: 3px;
  margin: 24px auto;
  display: block;
}

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

@media (max-width: 900px) {
  .builder {
    grid-template-columns: 1fr;
    padding: 0 16px 40px;
  }

  .field-row.two-col,
  .provider-grid,
  .style-grid {
    grid-template-columns: 1fr;
  }

  .theme-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .preview-panel {
    position: sticky;
    bottom: 10px;
    top: auto;
    background: var(--header-bg-strong);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 12px;
    box-shadow: var(--shadow-elevated);
    z-index: 5;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .success-shell {
    padding: 36px 16px 50px;
  }

  .success-state {
    padding: 24px 18px;
  }

  .order-link-row {
    flex-direction: column;
  }

  .order-link-row .btn-ghost {
    width: 100%;
  }
}
