/* ==========================================================================
   Screen s18 — BSM Scheduler (EX-05) · Stage 5 · 2 of 3
   ========================================================================== */

/* ---- Buyer summary (hero visual) -------------------------------------- */

.buyer-glass {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 460px;
  padding: 14px 16px 14px 14px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 36px -20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.buyer-glass__flag {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 14px;
  font-size: 26px;
  font-weight: 700;
  /* Windows shows flag emoji as letters (e.g. "DE"); keep them legible */
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.5);
}

.buyer-glass__info {
  flex: 1;
  min-width: 0;
}

.buyer-glass__name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 750;
  line-height: 1.3;
  color: #fff;
}

.buyer-glass__meta {
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.8);
}

.buyer-glass__status {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, #2e7d32, #43a047);
  box-shadow: 0 6px 16px -6px rgba(46, 125, 50, 0.8);
}

/* Cards stretch to the row height */
.block > .card {
  flex: 1;
}

/* Align the confirmation card with the slots card (skip the label row) */
.confirm-col {
  padding-top: calc(var(--fs-2xs) * 1.6 + 12px);
}

/* ---- Meeting slots ---------------------------------------------------- */

.slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1.5px solid var(--ink-200);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur-fast), box-shadow var(--dur);
}

/* radio indicator (decorative) */
.slot::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--ink-300);
  background: var(--surface);
}

.slot.is-open:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
}

.slot__date {
  padding-right: 28px;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 750;
  color: var(--ink-900);
}

.slot__time {
  font-size: var(--fs-sm);
  color: var(--ink-600);
  font-variant-numeric: tabular-nums;
}

.slot__status {
  align-self: flex-start;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--success-ink);
  background: var(--success-soft);
  border: 1px solid var(--success-line);
}

.slot.is-selected {
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(57, 73, 171, 0.12), transparent 70%),
    var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), var(--shadow-sm);
}

.slot.is-selected::after {
  border: 0;
  background:
    radial-gradient(circle, #fff 0 3.5px, transparent 4px),
    var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.slot.is-selected .slot__date {
  color: var(--accent-ink);
}

.slot.is-selected .slot__status {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.slot.is-taken {
  background:
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(23, 28, 26, 0.035) 8px 16px),
    var(--ink-100);
  border-style: dashed;
  opacity: 0.7;
  cursor: not-allowed;
}

.slot.is-taken::after {
  border-color: var(--ink-200);
  background: var(--ink-100);
}

.slot.is-taken .slot__date,
.slot.is-taken .slot__time {
  color: var(--ink-500);
}

.slot.is-taken .slot__status {
  color: var(--ink-500);
  background: var(--surface);
  border-color: var(--ink-200);
}

/* ---- BSM confirmed ---------------------------------------------------- */

.confirm-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(300px 160px at 100% 0%, rgba(129, 199, 132, 0.3), transparent 70%),
    var(--tone-soft);
}

.confirm-card__title {
  margin-bottom: 16px;
  font-size: var(--fs-lg);
}

.confirm-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--tone-ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--tone-line);
}

.confirm-row__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  font-size: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--tone-line);
}

.confirm-row__text {
  min-width: 0;
  padding-top: 4px;
  overflow-wrap: anywhere;
}

/* ---- Proforma invoice ------------------------------------------------- */

/* accent strip along the top edge of the document */
.invoice::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1a237e, #3949ab, #7986cb);
}

.invoice__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 18px;
  background: linear-gradient(180deg, var(--accent-soft), var(--surface));
  border-bottom: 1.5px dashed var(--accent-line);
}

.invoice__no {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-900);
  overflow-wrap: anywhere;
}

.invoice__badge {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--accent);
}

.invoice__rows {
  padding: 6px 24px 8px;
}

.invoice__rows .kv__row {
  padding: 12px 0;
}

.invoice__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 18px 24px 20px;
  background: var(--accent-soft);
  border-top: 1px solid var(--accent-line);
}

.invoice__total-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-800);
}

.invoice__total-value {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #1a237e;
  font-variant-numeric: tabular-nums;
}

/* ---- Coins + negotiation --------------------------------------------- */

.coins-earned__text {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: #c25e00;
}

.coins-earned__total {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 800;
  white-space: nowrap;
  color: #bf360c;
}

.negotiation .callout__body {
  line-height: 1.7;
}

/* ---- Responsive ------------------------------------------------------- */

@media (max-width: 960px) {
  .confirm-col {
    padding-top: 0;
  }
}

@media (max-width: 600px) {
  .slots {
    grid-template-columns: minmax(0, 1fr);
  }

  .buyer-glass {
    flex-wrap: wrap;
  }

  .invoice__head,
  .invoice__rows,
  .invoice__total {
    padding-left: 16px;
    padding-right: 16px;
  }
}
