/* ─────────────────────────────────────────────────────────────────────────────
   Spirit Vouchery — Formularz zakupu voucherów podarunkowych
   Dark theme: #0f0f16 bg, #c9a96e gold
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Wrap ────────────────────────────────────────────────────────────────────── */
.sv-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 60px;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color: #d1cdc7;
}

/* ── Pasek kroków ────────────────────────────────────────────────────────────── */
.sv-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}

.sv-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}
.sv-step-item.active { color: #c9a96e; }
.sv-step-item.done   { color: #4ade80; }

.sv-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1a1a2e;
  border: 1.5px solid #2a2a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s;
}
.sv-step-item.active .sv-step-num { background: #c9a96e22; border-color: #c9a96e; color: #c9a96e; }
.sv-step-item.done   .sv-step-num { background: #16451e33; border-color: #4ade80; color: #4ade80; }

.sv-step-sep {
  width: 48px;
  height: 1px;
  background: #2a2a3a;
  margin: 0 8px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .sv-step-label { display: none; }
  .sv-step-sep   { width: 24px; }
}

/* ── Tytuły ─────────────────────────────────────────────────────────────────── */
.sv-title {
  font-size: 24px;
  font-weight: 700;
  color: #f5f5f0;
  margin: 0 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
}
.sv-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
}
.sv-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #c9a96e;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 28px 0 16px;
}
.sv-optional {
  font-weight: 400;
  color: #6b7280;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Template cards ──────────────────────────────────────────────────────────── */
.sv-templates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
@media (max-width: 900px) { .sv-templates-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .sv-templates-grid { grid-template-columns: 1fr; } }

.sv-template-card {
  background: #13131e;
  border: 1.5px solid #1e1e2e;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  overflow: hidden;
  position: relative;
}
.sv-template-card:hover {
  border-color: #c9a96e55;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,169,110,0.08);
}
.sv-template-card.selected {
  border-color: #c9a96e;
  background: #1a160b;
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}

.sv-template-img-wrap {
  width: 100%;
  height: 130px;
  overflow: hidden;
}
.sv-template-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.sv-template-card:hover .sv-template-img { transform: scale(1.04); }

.sv-template-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.sv-template-card:hover .sv-template-video { transform: scale(1.04); }

.sv-template-body {
  padding: 14px 16px;
}
.sv-template-name {
  font-size: 15px;
  font-weight: 600;
  color: #f0ece4;
  margin-bottom: 6px;
}
.sv-template-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 10px;
}
.sv-template-price {
  font-size: 18px;
  font-weight: 700;
  color: #c9a96e;
}
.sv-template-price-type {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}
.sv-template-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  background: #c9a96e;
  color: #0a0a0f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.sv-custom-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
  border-style: dashed;
}
.sv-custom-card .sv-template-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Custom amount ───────────────────────────────────────────────────────────── */
.sv-custom-amount-wrap {
  margin-top: 16px;
  max-width: 220px;
}
.sv-amount-input {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #c9a96e !important;
  text-align: center;
}

/* ── Gift section ────────────────────────────────────────────────────────────── */
.sv-gift-section {
  background: #13131e;
  border: 1px solid #1e1e2e;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

/* ── Summary box ─────────────────────────────────────────────────────────────── */
.sv-summary-box {
  background: #0f0f16;
  border: 1px solid #c9a96e44;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.sv-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #9ca3af;
  padding: 4px 0;
}
.sv-summary-row strong {
  color: #f0ece4;
  font-weight: 600;
}

/* ── Form fields ─────────────────────────────────────────────────────────────── */
.sv-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 540px) { .sv-row { grid-template-columns: 1fr; } }

.sv-field {
  margin-bottom: 16px;
}

.sv-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 6px;
}

.sv-input {
  width: 100%;
  box-sizing: border-box;
  background: #0f0f16;
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  padding: 11px 14px;
  color: #d1cdc7;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.sv-input:focus { border-color: #c9a96e88; }
.sv-textarea { resize: vertical; min-height: 80px; }

.sv-hint {
  font-size: 12px;
  color: #4b5563;
  margin-top: 5px;
}

/* ── Consent ─────────────────────────────────────────────────────────────────── */
.sv-consent { margin: 8px 0 20px; }
.sv-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.5;
}
.sv-checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #c9a96e;
  cursor: pointer;
}
.sv-link {
  color: #c9a96e;
  text-decoration: none;
}
.sv-link:hover { text-decoration: underline; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.sv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  transition: all 0.15s;
  width: 100%;
  max-width: 360px;
}
.sv-btn--primary {
  background: #c9a96e;
  color: #0a0a0f;
}
.sv-btn--primary:hover:not(:disabled) { filter: brightness(1.1); }
.sv-btn--primary:disabled { opacity: 0.6; cursor: not-allowed; }

.sv-btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sv-back {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
  font-family: inherit;
  transition: color 0.15s;
}
.sv-back:hover { color: #c9a96e; }

/* ── Note ────────────────────────────────────────────────────────────────────── */
.sv-note {
  font-size: 12px;
  color: #4b5563;
  margin-top: 12px;
  text-align: center;
  line-height: 1.6;
}

/* ── Error ───────────────────────────────────────────────────────────────────── */
.sv-error {
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.3);
  color: #fca5a5;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ── Loading ─────────────────────────────────────────────────────────────────── */
.sv-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 14px;
  padding: 24px 0;
}

/* ── Spinners ────────────────────────────────────────────────────────────────── */
.sv-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #2a2a3a;
  border-top-color: #c9a96e;
  border-radius: 50%;
  animation: sv-spin 0.8s linear infinite;
  flex-shrink: 0;
}
.sv-spinner--sm {
  width: 14px;
  height: 14px;
}
@keyframes sv-spin { to { transform: rotate(360deg); } }

/* ── Redirect step ───────────────────────────────────────────────────────────── */
.sv-redirect-step {
  text-align: center;
  padding: 48px 0;
}
.sv-spin-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.sv-spinner-circle {
  width: 64px;
  height: 64px;
  animation: sv-spin 1.2s linear infinite;
}

/* ── Event template badge ────────────────────────────────────────────────────── */
.sv-template-event-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a96e;
  background: rgba(201,169,110,0.1);
  border: 1px solid rgba(201,169,110,0.25);
  padding: 2px 8px;
  border-radius: 20px;
}
.sv-badge-gray {
  color: #6b7280;
  background: rgba(107,114,128,0.1);
  border-color: rgba(107,114,128,0.25);
}

/* ── Terminy (slot picker) ───────────────────────────────────────────────────── */
.sv-slots-section {
  background: #13131e;
  border: 1px solid #1e1e2e;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0 0;
}

/* ── Siatka slotów (data + godzina w jednym przycisku) ──────────────────────── */
.sv-slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.sv-slot-btn {
  background: #0f0f16;
  border: 1.5px solid #2a2a3a;
  border-radius: 10px;
  padding: 12px 18px;
  min-width: 130px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.15s;
}
.sv-slot-btn:hover:not(:disabled) {
  border-color: #c9a96e55;
  background: #13131e;
}
.sv-slot-btn--active {
  background: #1a160b;
  border-color: #c9a96e;
  box-shadow: 0 0 0 3px rgba(201,169,110,0.1);
}
.sv-slot-btn--full {
  opacity: 0.4;
  cursor: not-allowed;
}
.sv-slot-btn:disabled { cursor: not-allowed; }

.sv-slot-date {
  font-size: 13px;
  font-weight: 600;
  color: #f0ece4;
  text-transform: capitalize;
}
.sv-slot-btn--active .sv-slot-date { color: #c9a96e; }

.sv-slot-time {
  font-size: 22px;
  font-weight: 700;
  color: #c9a96e;
  line-height: 1.1;
  font-family: 'Playfair Display', Georgia, serif;
}
.sv-slot-btn--full .sv-slot-time { color: #4b5563; }

.sv-slot-avail {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  border-top: 1px solid #1e1e2e;
  padding-top: 4px;
  width: 100%;
  text-align: center;
}
.sv-slot-avail--full { color: #ef4444; }

/* ── Quantity stepper ────────────────────────────────────────────────────────── */
.sv-qty-field {
  background: #13131e;
  border: 1px solid #1e1e2e;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0 0;
}

.sv-qty-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 8px;
}

.sv-qty-btn {
  width: 40px;
  height: 40px;
  background: #0f0f16;
  border: 1.5px solid #2a2a3a;
  color: #c9a96e;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.sv-qty-btn:first-child { border-radius: 8px 0 0 8px; }
.sv-qty-btn:last-child  { border-radius: 0 8px 8px 0; }
.sv-qty-btn:hover { background: #1a160b; border-color: #c9a96e55; }

.sv-qty-val {
  min-width: 60px;
  height: 40px;
  background: #0f0f16;
  border-top: 1.5px solid #2a2a3a;
  border-bottom: 1.5px solid #2a2a3a;
  color: #f0ece4;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
}

.sv-hint strong { color: #c9a96e; }

/* ── Coming soon ─────────────────────────────────────────────────────────────── */
.sv-coming-soon-card {
  cursor: default !important;
  pointer-events: auto;
}
.sv-coming-soon-card:hover {
  transform: none !important;
  border-color: #1e1e2e !important;
  box-shadow: none !important;
}

.sv-template-img-wrap {
  position: relative;
}

.sv-coming-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(10, 8, 5, 0.82) 0%,
    rgba(30, 20, 5, 0.88) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  backdrop-filter: blur(2px);
}

.sv-coming-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 600;
  color: #c9a96e;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 12px rgba(201, 169, 110, 0.4);
}

.sv-coming-date {
  font-size: 11px;
  color: #a07840;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ── [x-cloak] hidden until Alpine initializes ───────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── Opis z rozwinięciem ─────────────────────────────────────────────────────── */
.sv-template-desc-wrap { position: relative; }
.sv-template-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sv-template-desc.sv-desc-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.sv-desc-more {
  background: none;
  border: none;
  color: #c9a96e;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.sv-desc-more:hover { text-decoration: underline; }

/* ── Rozwinięty kafelek (expanded card) ──────────────────────────────────────── */
.sv-expanded-card {
  display: flex;
  align-items: stretch;
  background: #13131e;
  border: 1.5px solid #c9a96e55;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 4px 24px rgba(201,169,110,0.06);
  animation: sv-expand-in 0.25s ease;
}
@keyframes sv-expand-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sv-expanded-card--custom {
  border-color: #2a2a3a;
}

.sv-expanded-media {
  width: 180px;
  flex-shrink: 0;
  overflow: hidden;
}
.sv-expanded-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sv-expanded-img-placeholder {
  width: 100%;
  height: 100%;
  background: #0f0f16;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.sv-expanded-img-placeholder .sv-placeholder-icon {
  width: 40px;
  height: 40px;
  color: #2a2a3a;
}

.sv-expanded-info {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sv-expanded-name {
  font-size: 17px;
  font-weight: 700;
  color: #f0ece4;
  font-family: 'Playfair Display', Georgia, serif;
  margin-bottom: 4px;
}
.sv-expanded-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.55;
  flex: 1;
}

.sv-expanded-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(201,169,110,0.06);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 8px;
}
.sv-expanded-slot-date { font-size: 13px; font-weight: 600; color: #f0ece4; }
.sv-expanded-slot-time { font-size: 13px; font-weight: 700; color: #c9a96e; }
.sv-expanded-slot-qty  {
  font-size: 11px; color: #9ca3af;
  background: #1a1a2e; padding: 2px 8px; border-radius: 10px;
}

.sv-expanded-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}
.sv-expanded-amount-label { font-size: 12px; color: #6b7280; }
.sv-expanded-amount-val   { font-size: 20px; font-weight: 700; color: #c9a96e; }

/* ── Formularz danych kupującego ─────────────────────────────────────────────── */
.sv-buyer-form {
  animation: sv-expand-in 0.2s ease;
}

@media (max-width: 560px) {
  .sv-expanded-card { flex-direction: column; }
  .sv-expanded-media { width: 100%; height: 160px; }
}

/* ── Placeholder icon ────────────────────────────────────────────────────────── */
.sv-template-img-placeholder {
  width: 100%;
  height: 100%;
  background: #0f0f16;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sv-placeholder-icon {
  width: 48px;
  height: 48px;
  color: #1e1e2e;
}
.sv-custom-placeholder { background: #0a0a0f; }

/* ── Faktura VAT ─────────────────────────────────────────────────────────────── */
.sv-invoice-fields {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.03);
  animation: sv-expand-in 0.2s ease;
}
