/* Đặt bàn - Bến Bia. Prefix .bk- */

.bk { color: var(--cream); }
.bk-form[hidden] { display: none; }

.bk-form {
  background: var(--coal);
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 38px);
  display: grid;
  gap: clamp(18px, 2.6vw, 28px);
}

.bk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 290px);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}
.bk-fields { display: grid; gap: 20px; min-width: 0; }
.bk-title { font-size: clamp(24px, 2.8vw, 32px); letter-spacing: -.03em; }

.bk-field { display: grid; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.bk-field > label,
.bk-field > legend {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--steel);
  padding: 0;
}
.bk-field legend { margin-bottom: 4px; }

.bk-count {
  margin-left: 8px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .02em; text-transform: none; color: var(--amber);
}

.bk-field input[type="text"],
.bk-field input[type="tel"],
.bk-field input[type="date"],
.bk-field input[type="number"],
.bk-field select,
.bk-field textarea {
  width: 100%; min-height: 48px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--ink); color: var(--cream);
  font-family: var(--display); font-size: 15.5px; line-height: 1.4;
  transition: border-color .2s, box-shadow .2s;
}
.bk-field textarea { resize: vertical; min-height: 86px; }
.bk-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='%23E0A64B' 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;
}
.bk-field input:focus-visible,
.bk-field select:focus-visible,
.bk-field textarea:focus-visible,
.bk-slot input:focus-visible + .bk-slot-in {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 1px rgba(224, 166, 75, .35);
}
.bk-field input::placeholder, .bk-field textarea::placeholder { color: #6F6A5E; }
.bk-field input[type="date"] { color-scheme: dark; }
.bk-field.has-error input, .bk-field.has-error select, .bk-field.has-error textarea { border-color: var(--red); }

.bk-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.bk-hint, .bk-small { margin: 0; font-size: 12px; line-height: 1.55; color: var(--steel); }

/* khu ngồi */
.bk-areas { display: grid; gap: 8px; }
.bk-area { display: block; cursor: pointer; }
.bk-area input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bk-area-in {
  display: block; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--ink); transition: border-color .2s, background .2s;
}
.bk-area-in b { display: inline-block; font-size: 14.5px; margin-right: 8px; }
.bk-area-in small { font-family: var(--mono); font-size: 9.5px; color: var(--steel); }
.bk-area-in em { display: block; font-style: normal; font-size: 12px; color: var(--steel); margin-top: 3px; }
.bk-area input:checked + .bk-area-in { border-color: var(--amber); background: rgba(224, 166, 75, .07); }
.bk-area input:focus-visible + .bk-area-in { outline: 2px solid var(--amber); outline-offset: 2px; }

/* khung giờ */
.bk-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.bk-slot { display: block; cursor: pointer; min-width: 0; }
.bk-slot input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bk-slot-in {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 8px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--ink); text-align: center;
  transition: border-color .18s, background .18s;
}
.bk-slot-in b { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.bk-slot-in small { font-family: var(--mono); font-size: 8.5px; color: var(--steel); }
.bk-slot:hover .bk-slot-in { border-color: rgba(224, 166, 75, .5); }
.bk-slot input:checked + .bk-slot-in { border-color: var(--amber); background: rgba(224, 166, 75, .1); }
.bk-slot.is-full { cursor: not-allowed; }
.bk-slot.is-full .bk-slot-in { opacity: .32; text-decoration: line-through; }
.bk-slots.is-loading { opacity: .45; pointer-events: none; }
.bk-slots-status { margin: 2px 0 0; font-size: 12px; color: var(--steel); }

.bk-optional { font-family: var(--display); font-size: 11px; text-transform: none; letter-spacing: 0; color: #6F6A5E; }

.bk-summary {
  position: sticky; top: 96px;
  border: 1px solid var(--line); background: var(--ink); padding: 20px;
}
.bk-summary-eyebrow {
  display: block; font-family: var(--mono); font-size: 9px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--steel); margin-bottom: 10px;
}
.bk-sum-name { display: block; font-size: 21px; line-height: 1.2; margin-bottom: 3px; }
.bk-sum-meta { display: block; font-family: var(--mono); font-size: 10px; color: var(--amber); margin-bottom: 16px; }
.bk-sum-list { display: grid; gap: 9px; border-top: 1px solid var(--line); padding-top: 14px; }
.bk-sum-list > div { display: flex; justify-content: space-between; gap: 14px; }
.bk-sum-list dt { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); padding-top: 2px; }
.bk-sum-list dd { margin: 0; font-size: 12px; text-align: right; color: var(--cream-dim); max-width: 66%; }
.bk-sum-note { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 9.5px; line-height: 1.6; color: var(--steel); }

.bk-err { margin: 0; font-size: 12px; line-height: 1.5; color: var(--red); }
.bk-err-form { margin-top: 2px; padding: 10px 12px; border: 1px solid rgba(196, 85, 60, .45); background: rgba(196, 85, 60, .08); }
.bk-submit { display: grid; gap: 10px; }
.bk-submit .btn { justify-self: stretch; }
.bk-small { text-align: center; }

/* xong */
.bk-done {
  border: 1px solid var(--amber); background: var(--coal);
  padding: clamp(24px, 4vw, 40px);
}
.bk-done[hidden] { display: none; }
.bk-done-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--amber); border-radius: 50%;
  color: var(--amber); font-size: 22px; margin-bottom: 16px;
}
.bk-done-title { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 8px; }
.bk-done-code { font-family: var(--mono); font-size: 12px; color: var(--steel); margin-bottom: 20px; }
.bk-done-code b { color: var(--amber); font-weight: 500; letter-spacing: .08em; }
.bk-done .bk-sum-list { margin-bottom: 18px; }
.bk-done-note { font-size: 12.5px; color: var(--steel); margin-bottom: 20px; }
.bk-done-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .bk-grid { grid-template-columns: 1fr; }
  .bk-summary { position: static; }
}
@media (max-width: 720px) {
  .bk-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .bk-row { grid-template-columns: 1fr; }
  .bk-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bk-form { padding: 18px; }
  .bk-done-actions .btn { width: 100%; }
}
