/* Giữ ngày - Trung Tâm Tiệc Cưới Lotus. Prefix .book- và .confirm-. */

.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: clamp(22px, 3vw, 38px);
  align-items: start;
}

.lotus-book {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--red);
  padding: clamp(20px, 3vw, 36px);
  display: grid;
  gap: 22px;
}

.lotus-book[hidden], .book-layout[hidden] { display: none; }

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

.book-field { display: grid; gap: 7px; min-width: 0; }
.book-field-wide { grid-column: 1 / -1; }

.book-field > label {
  font-size: 11px; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted);
}

.book-field input,
.book-field select,
.book-field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1px solid var(--hairline); border-radius: var(--r);
  background: var(--ivory); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.4;
  transition: border-color .2s, background .2s;
}
.book-field textarea { resize: vertical; min-height: 90px; }
.book-field select {
  appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237C1D2B' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.book-field input:focus-visible,
.book-field select:focus-visible,
.book-field textarea:focus-visible {
  outline: none; border-color: var(--gold); background: var(--paper);
}
.book-field.has-error input,
.book-field.has-error select,
.book-field.has-error textarea {
  border-color: var(--red); background: rgba(124, 29, 43, .04);
}

.book-hint { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.book-hint b { color: var(--ink); font-weight: 600; }
.book-optional { text-transform: none; letter-spacing: 0; color: var(--muted-2); font-weight: 400; }

.book-err { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--red); font-weight: 500; }
.book-err:empty { display: none; }
.book-err-form {
  padding: 12px 14px; border: 1px solid rgba(124, 29, 43, .3);
  border-radius: var(--r); background: rgba(124, 29, 43, .06);
}

.book-submit { display: grid; gap: 10px; }
.book-submit .btn { min-height: 56px; }
.book-small { font-size: 12.5px; line-height: 1.6; color: var(--muted); text-align: center; margin: 0; }

.book-summary {
  position: sticky; top: 96px;
  background: var(--ivory); border: 1px solid var(--hairline); border-top: 2px solid var(--gold);
  padding: 24px; display: grid; gap: 8px; align-content: start; min-width: 0;
}
.book-summary-eyebrow {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.book-sum-name { font-family: var(--serif); font-size: 24px; line-height: 1.2; font-weight: 500; }
.book-sum-meta { font-size: 13px; color: var(--red); font-weight: 500; font-variant-numeric: tabular-nums; }
.book-sum-list { margin: 14px 0 0; display: grid; gap: 0; }
.book-sum-list > div {
  display: flex; justify-content: space-between; gap: 14px;
  border-top: 1px dotted var(--hairline); padding: 9px 0;
}
.book-sum-list dt { font-size: 12px; color: var(--muted); flex: none; }
.book-sum-list dd { margin: 0; font-size: 13.5px; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.book-sum-note { margin: 14px 0 0; font-size: 12px; line-height: 1.65; color: var(--muted); }

/* ---------- xác nhận ---------- */
.confirm-card, .book-done {
  background: var(--paper); border: 1px solid var(--hairline); border-top: 2px solid var(--gold);
  padding: clamp(24px, 4vw, 44px);
  display: grid; gap: 6px; justify-items: center; text-align: center;
  max-width: 680px; margin: 0 auto clamp(30px, 4vw, 48px);
}
.book-done[hidden] { display: none; }
.confirm-mark {
  width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--gold); color: var(--gold);
  font-size: 22px; margin-bottom: 8px;
}
.confirm-card h3, .book-done h3 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2rem);
}
.confirm-code {
  margin: 0; font-size: 12px; letter-spacing: .06em; color: var(--muted);
  border-bottom: 1px solid var(--hairline); padding-bottom: 8px;
}
.confirm-code b { color: var(--ink); letter-spacing: .1em; }
.confirm-list { width: 100%; margin: 14px 0 0; display: grid; gap: 0; text-align: left; }
.confirm-list > div {
  display: flex; justify-content: space-between; gap: 14px;
  border-top: 1px dotted var(--hairline); padding: 9px 0;
}
.confirm-list dt { font-size: 12px; color: var(--muted); flex: none; }
.confirm-list dd { margin: 0; font-size: 13.5px; font-weight: 500; text-align: right; }
.confirm-note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--muted); max-width: 54ch; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; margin-top: 14px; }

.form-alert {
  padding: 12px 16px; border: 1px solid rgba(124, 29, 43, .3);
  background: rgba(124, 29, 43, .06); color: var(--red);
  font-size: 14px; margin: 0 0 22px;
}

@media (max-width: 940px) {
  .book-layout { grid-template-columns: minmax(0, 1fr); }
  .book-summary { position: static; order: 2; }
}

@media (max-width: 560px) {
  .lotus-book { padding: 18px 16px; }
  .book-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .book-field-wide { grid-column: auto; }
  .confirm-actions { flex-direction: column; width: 100%; }
  .confirm-actions .btn { width: 100%; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .book-field input, .book-field select, .book-field textarea { transition: none; }
}
