/* ═══════════════════════════════════════════════════════════════════
   IVA Cloud — Checkout & Thank-You CSS
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────────── */

.checkout-hero {
  padding: 80px var(--page-px, 24px) 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.checkout-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #00c7d1);
}

.checkout-hero-title {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin: 0;
}

/* ── Section & Grid ───────────────────────────────────────────────── */

.checkout-section {
  padding: 0 var(--page-px, 24px) 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

@media (min-width: 960px) {
  .checkout-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
  }
}

/* ── Blocks ───────────────────────────────────────────────────────── */

.checkout-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.checkout-block:last-of-type {
  margin-bottom: 0;
}

.checkout-block-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Form elements ────────────────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-label {
    display: block;
    font-family: 'Geist Mono', ui-monospace, monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #888;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    background: #1A1A1C;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 12px 14px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .15s ease;
    outline: none;
    box-sizing: border-box;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input.is-readonly {
    background: rgba(255,255,255,0.02);
    color: #b8b8bd;
    cursor: not-allowed;
}

.form-input.has-error {
  border-color: #FF4D4D;
}

.form-textarea {
  height: auto;
  padding: 14px 16px;
  resize: vertical;
  min-height: 80px;
}

.form-error {
  font-size: 0.78rem;
  color: #FF4D4D;
  min-height: 1.2em;
  display: block;
}

.form-error-global {
  text-align: center;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

/* ── Radio Pills ──────────────────────────────────────────────────── */

.radio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0;
}

.radio-pill {
  position: relative;
  cursor: pointer;
}

.radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.radio-pill span {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 99px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s, box-shadow 0.18s;
  user-select: none;
}

.radio-pill input:checked + span {
  border-color: var(--accent, #00c7d1);
  background: rgba(0, 199, 209, 0.12);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 199, 209, 0.14);
}

.radio-pill span:hover {
  border-color: rgba(0, 199, 209, 0.5);
  color: #fff;
}

/* ── Business fields ──────────────────────────────────────────────── */

.business-fields {
  display: none;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
  animation: fadeSlideDown 0.22s ease;
}

.business-fields.is-visible {
  display: flex;
}

/* ── Delivery Cards ───────────────────────────────────────────────── */

.delivery-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.delivery-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.delivery-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.delivery-card.is-checked,
.delivery-card:has(input:checked) {
  border-color: var(--accent, #00c7d1);
  background: rgba(0, 199, 209, 0.08);
}

.delivery-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.delivery-card-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
}

.delivery-card-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

.delivery-card-price {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.delivery-fields-courier,
.delivery-fields-np {
  display: none;
  animation: fadeSlideDown 0.22s ease;
  margin-top: 4px;
}

.delivery-fields-courier.is-visible,
.delivery-fields-np.is-visible {
  display: block;
}

/* ── Saved delivery address card ─────────────────────────────────── */
.delivery-saved {
    background: rgba(0,199,209,0.06);
    border: 1px solid rgba(0,199,209,0.25);
    border-radius: 16px;
    padding: 16px 20px;
    margin-top: 8px;
}
.delivery-saved-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.delivery-saved-title { font-weight: 600; margin-bottom: 4px; color: #fff; }
.delivery-saved-meta { color: rgba(255,255,255,0.7); font-size: 14px; }

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-family: inherit;
}
.btn-link:hover { color: #00b3bd; }

/* ── NP Autocomplete in checkout ─────────────────────────────────── */
.np-picker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .np-picker-grid { grid-template-columns: 1fr; }
}

.np-combo { position: relative; }

.np-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-top: 4px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.np-suggestion {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #b8b8bd;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.np-suggestion:last-child { border-bottom: none; }
.np-suggestion:hover { background: rgba(0, 199, 209, 0.1); color: var(--accent); }

/* Delivery type radio row */
.delivery-picker .radio-row {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 6px;
}
.delivery-picker .radio-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #b8b8bd;
}
.delivery-picker .radio-row input[type="radio"] { accent-color: var(--accent); }

/* ── Payment Options ──────────────────────────────────────────────── */

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-option {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, opacity 0.18s;
}

.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-option.is-checked,
.payment-option:has(input:checked) {
  border-color: var(--accent, #00c7d1);
  background: rgba(0, 199, 209, 0.08);
}

.payment-option.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.payment-option-body {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.payment-option-icon {
  color: var(--accent, #00c7d1);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.payment-option-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
}

.payment-option-desc {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* ── Promo ────────────────────────────────────────────────────────── */

.promo-row {
  display: flex;
  gap: 10px;
}

.promo-input {
  flex: 1;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn-promo-apply {
  padding: 0 22px;
  height: 56px;
  background: rgba(0, 199, 209, 0.15);
  border: 1.5px solid rgba(0, 199, 209, 0.4);
  border-radius: 12px;
  color: var(--accent, #00c7d1);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  font-family: inherit;
}

.btn-promo-apply:hover {
  background: rgba(0, 199, 209, 0.25);
  border-color: var(--accent, #00c7d1);
  color: #fff;
}

.promo-status {
  font-size: 0.83rem;
  min-height: 1.4em;
  margin-top: 8px;
  transition: color 0.2s;
}

.promo-status--ok  { color: #34D399; }
.promo-status--err { color: #FF4D4D; }

/* ── Submit ───────────────────────────────────────────────────────── */

.checkout-submit-wrap {
  margin-top: 24px;
}

.btn-checkout-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 60px;
  background: var(--accent, #00c7d1);
  border: none;
  border-radius: 99px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
  box-shadow: 0 4px 24px rgba(0, 199, 209, 0.35);
}

.btn-checkout-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 199, 209, 0.5);
}

.btn-checkout-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submit-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

/* ── Summary Sidebar ──────────────────────────────────────────────── */

.checkout-summary-col {
  /* No sticky on mobile */
}

@media (min-width: 960px) {
  .checkout-summary-col {
    position: sticky;
    top: calc(var(--navbar-height, 72px) + 24px);
  }
}

.checkout-summary-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px 24px;
  backdrop-filter: blur(12px);
}

.summary-title {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 20px;
}

/* Items list */
.summary-item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-item-img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.summary-item-img-placeholder {
  color: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.summary-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.summary-item-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.summary-item-qty {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

.summary-item-price {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  flex-shrink: 0;
}

.summary-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
}

/* Divider */
.summary-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 20px 0;
}

/* Rows */
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.88rem;
}

.summary-row-label { color: rgba(255,255,255,0.55); }
.summary-row-value { font-weight: 600; color: rgba(255,255,255,0.85); }
.summary-discount-value { color: #FF4D4D; }

.summary-total-row {
  padding: 8px 0 0;
}

.summary-total-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.summary-total-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.summary-policy {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
  margin: 16px 0 0;
  text-align: center;
}

.summary-policy a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Thank You Page ───────────────────────────────────────────────── */

.thankyou-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 80px var(--page-px, 24px);
  min-height: calc(100vh - var(--navbar-height, 72px) - 200px);
}

.thankyou-card {
  max-width: 600px;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  animation: fadeSlideUp 0.4s ease;
}

@media (max-width: 600px) {
  .thankyou-card { padding: 36px 20px; }
}

.thankyou-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 28px;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.thankyou-icon svg {
  width: 100%;
  height: 100%;
}

.thankyou-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
}

.thankyou-message {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin: 0 0 28px;
}

.thankyou-message strong {
  color: #fff;
  font-weight: 700;
}

.thankyou-card-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,102,255,0.12);
  border: 1px solid rgba(0,102,255,0.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.thankyou-items {
  width: 100%;
  margin-bottom: 20px;
}

.thankyou-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.thankyou-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 12px;
}

.thankyou-item:last-child {
  border-bottom: none;
}

.thankyou-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.thankyou-item-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

.thankyou-item-sku {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  font-family: 'Geist Mono', monospace;
}

.thankyou-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.thankyou-item-qty {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

.thankyou-item-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

.thankyou-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 0 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 4px;
  margin-bottom: 32px;
}

.thankyou-total-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.thankyou-total-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.thankyou-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.btn-thankyou-shop,
.btn-thankyou-home {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 99px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
}

.btn-thankyou-shop {
  background: var(--accent, #00c7d1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,102,255,0.35);
}

.btn-thankyou-shop:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,102,255,0.5);
}

.btn-thankyou-home {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.85);
}

.btn-thankyou-home:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* ── Animations ───────────────────────────────────────────────────── */

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.5); }
  70%  { transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

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

/* Re-use cart spinner */
.cart-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent, #00c7d1);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Плашка "оформлюється для" */
.checkout-logged-as {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.checkout-logged-as__left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    flex-wrap: wrap;
}
.checkout-logged-as__icon {
    color: var(--accent);
    flex-shrink: 0;
}
.checkout-logged-as__label {
    color: #888;
}
.checkout-logged-as__email {
    color: #fff;
    font-weight: 500;
    font-family: 'Geist Mono', ui-monospace, monospace;
    font-size: 13px;
}
.checkout-logged-as__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0,199,209,.1);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(0,199,209,.2);
    transition: background-color .15s ease, border-color .15s ease;
    white-space: nowrap;
}
.checkout-logged-as__link:hover {
    background: rgba(0,199,209,.18);
    border-color: rgba(0,199,209,.4);
}

/* Грід полів */
.checkout-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.checkout-fields-grid .form-row--full {
    grid-column: 1 / -1;
}
@media (max-width: 600px) {
    .checkout-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* Підказка під полем */
.form-hint {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    line-height: 1.4;
}
.form-hint--warn {
    color: #ffb86b;
}
.form-hint--warn a {
    color: var(--accent);
    text-decoration: underline;
}
.form-hint--warn a:hover {
    text-decoration: none;
}

/* ── Disabled options ───────────────────────────────────────────── */
.delivery-card.is-disabled,
.payment-option.is-disabled,
label.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

