/* SeatMap — reservation widget. Class names are shared with the WordPress
   plugin's engine; only the look lives here. */
.srm-map-wrap {
  --srm-avail:    #30d158;
  --srm-reserved: #ff3b30;
  --srm-selected: #0071e3;
  --srm-bg:       #f5f5f7;
  --srm-surface:  #ffffff;
  --srm-border:   #e5e5ea;
  --srm-border-2: #d2d2d7;
  --srm-text:     #1d1d1f;
  --srm-text-2:   #6e6e73;
  --srm-text-3:   #aeaeb2;
  --srm-radius:   16px;
  --srm-radius-sm: 10px;
  --srm-shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.05);
  --srm-shadow-lg: 0 12px 40px rgba(0,0,0,.14);
  --srm-ring:     0 0 0 3px rgba(0,113,227,.22);
}

/* Wrap */
.srm-map-wrap { position: relative; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; color: var(--srm-text); background: var(--srm-surface); border: 1px solid var(--srm-border); border-radius: var(--srm-radius); padding: 22px 22px 0; box-shadow: var(--srm-shadow-sm); font-size: 14px; line-height: 1.45; box-sizing: border-box; }
.srm-map-wrap *, .srm-map-wrap *::before, .srm-map-wrap *::after { box-sizing: border-box; }
.srm-map__title { font-size: 21px; font-weight: 700; color: var(--srm-text); margin: 0 0 14px; letter-spacing: -.02em; line-height: 1.2; }

/* Toolbar */
.srm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.srm-toolbar .srm-filter-search { flex: 1 1 180px; min-width: 140px; }
.srm-toolbar .srm-filter-price { width: 112px; }
.srm-toolbar__spacer { flex: 1 1 auto; }
.srm-filter-count { font-size: 12.5px; color: var(--srm-text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.srm-filter-access { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--srm-text-2); cursor: pointer; padding: 0 4px; }
.srm-filter-access input { accent-color: var(--srm-selected); margin: 0; }
.srm-filter-access[hidden], .srm-filter-zone[hidden], .srm-party-wrap[hidden] { display: none !important; }
.srm-tool-overlay[aria-pressed="true"] { background: var(--srm-text); color: #fff; border-color: var(--srm-text); }
.srm-ico { display: inline-flex; align-items: center; line-height: 0; }
.srm-ico svg { display: block; }
.srm-btn .srm-btn__label { line-height: 1; }

/* Inputs & buttons */
.srm-map-wrap .srm-input { height: 36px; padding: 0 12px; border: 1px solid var(--srm-border-2); border-radius: var(--srm-radius-sm); font: inherit; font-size: 13.5px; color: var(--srm-text); background: var(--srm-surface); outline: none; transition: border-color .15s, box-shadow .15s; }
.srm-map-wrap select.srm-input { padding-right: 28px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.srm-map-wrap .srm-input:focus { border-color: var(--srm-selected); box-shadow: var(--srm-ring); }
.srm-map-wrap .srm-input::placeholder { color: var(--srm-text-3); }
.srm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--srm-radius-sm); font: inherit; font-size: 13.5px; font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; white-space: nowrap; line-height: 1; }
.srm-btn:active { transform: scale(.98); }
.srm-btn:focus-visible { outline: none; box-shadow: var(--srm-ring); }
.srm-btn--primary { background: var(--srm-selected); color: #fff; height: 42px; padding: 0 20px; font-size: 14px; }
.srm-btn--primary:hover, .srm-btn--primary:focus { background: #0062c4; color: #fff; }
.srm-btn--primary:disabled, .srm-summary-bar__btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.srm-btn--ghost { background: var(--srm-surface); border-color: var(--srm-border-2); color: var(--srm-text); font-weight: 500; }
.srm-btn--ghost:hover { background: var(--srm-bg); }
.srm-map-wrap .srm-guest-form__cancel { background: var(--srm-bg); color: var(--srm-text); height: 42px; padding: 0 18px; }

/* Layout */
.srm-map-body { display: block; }
@media (min-width: 860px) {
  .srm-map-body--with-date { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
  .srm-map-body--with-date .srm-datepicker-wrap { margin-bottom: 0; position: sticky; top: 12px; }
}

/* Date picker */
.srm-datepicker-wrap { margin-bottom: 18px; }
.srm-datepicker { background: var(--srm-bg); border-radius: 14px; padding: 14px; }
.srm-datepicker__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.srm-dp-title { font-weight: 600; font-size: 14.5px; color: var(--srm-text); }
.srm-dp-prev, .srm-dp-next { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; background: var(--srm-surface); border: 1px solid var(--srm-border); border-radius: 8px; cursor: pointer; color: var(--srm-text); font-size: 14px; padding: 0; transition: background .15s; }
.srm-dp-prev:hover, .srm-dp-next:hover { background: #fff; border-color: var(--srm-border-2); }
.srm-dp-days, .srm-dp-cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.srm-dp-days { margin-bottom: 2px; }
.srm-dp-day-name { text-align: center; font-size: 11px; font-weight: 600; color: var(--srm-text-3); padding: 4px 0; }
.srm-dp-cell { background: none; border: none; border-radius: 8px; height: 34px; text-align: center; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--srm-text); transition: background .12s, color .12s; font-variant-numeric: tabular-nums; }
.srm-dp-cell:hover { background: #fff; }
.srm-dp-cell.is-past { color: var(--srm-text-3); cursor: not-allowed; font-weight: 400; }
.srm-dp-cell.is-past:hover { background: none; }
.srm-dp-cell.is-closed { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.srm-dp-cell.is-selected, .srm-dp-cell.srm-dp-day--rangeend { background: var(--srm-selected); color: #fff; font-weight: 600; }
.srm-dp-cell.srm-dp-day--inrange { background: rgba(0,113,227,.14); border-radius: 0; }
.srm-time-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--srm-border); }
.srm-time-slot { background: var(--srm-surface); border: 1px solid var(--srm-border); border-radius: 8px; height: 32px; font: inherit; font-size: 13px; font-weight: 500; color: var(--srm-text); cursor: pointer; transition: all .12s; font-variant-numeric: tabular-nums; }
.srm-time-slot:hover { border-color: var(--srm-selected); color: var(--srm-selected); }
.srm-time-slot.is-selected { background: var(--srm-selected); color: #fff; border-color: var(--srm-selected); }

/* Canvas */
.srm-canvas-container { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 12px; background: var(--srm-bg); }
.srm-map__image { display: block; width: 100%; height: auto; user-select: none; }
.srm-map__svg { position: absolute; top: 0; left: 0; overflow: visible; }
.srm-map__image--placeholder { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 0; background-color: #f0f2f6; background-image: linear-gradient(rgba(0,0,0,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.05) 1px, transparent 1px); background-size: 32px 32px; }
.srm-seat { filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.18)); transition: fill .2s, opacity .15s, filter .15s; }
.srm-seat.is-available:hover { filter: drop-shadow(0 3px 6px rgba(0,0,0,.22)) brightness(1.05); }
.srm-seat.is-selected { filter: drop-shadow(0 0 0 3px rgba(0,113,227,.28)) drop-shadow(0 3px 8px rgba(0,113,227,.35)); }
.srm-seat:focus-visible { outline: none; filter: drop-shadow(0 0 0 3px rgba(0,113,227,.45)); }
.srm-seat-label { font-family: inherit; letter-spacing: .01em; }
.srm-date-hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 5; max-width: calc(100% - 28px); background: rgba(29,29,31,.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); pointer-events: none; animation: srm-scale-in .15s ease; }
.srm-date-hint[hidden] { display: none; }

/* Legend */
.srm-legend { display: flex; gap: 14px; margin: 14px 0 0; flex-wrap: wrap; padding-bottom: 16px; }
.srm-legend__item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--srm-text-2); }
.srm-legend__item::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.srm-legend__item--available::before { background: var(--srm-avail); }
.srm-legend__item--reserved::before  { background: var(--srm-reserved); opacity: .6; }
.srm-legend__item--selected::before  { background: var(--srm-selected); }
.srm-legend__item--vip::before       { background: #ff9f0a; }

/* Summary bar */
.srm-summary-bar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: rgba(255,255,255,.9); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); border-top: 1px solid var(--srm-border); padding: 12px 22px; margin: 0 -22px; border-radius: 0 0 var(--srm-radius) var(--srm-radius); animation: srm-slide-up .2s ease; }
.srm-summary-bar[hidden] { display: none; }
.srm-summary-bar__info { font-size: 14px; font-weight: 500; color: var(--srm-text); flex: 1 1 auto; }
.srm-party-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--srm-text-2); }
.srm-map-wrap .srm-party-select { height: 36px; padding: 0 28px 0 10px; border: 1px solid var(--srm-border-2); border-radius: 9px; font: inherit; font-size: 13.5px; color: var(--srm-text); background: var(--srm-surface); }
@keyframes srm-slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes srm-scale-in { from { opacity: 0; transform: translateX(-50%) scale(.94); } to { opacity: 1; transform: translateX(-50%) scale(1); } }

/* Guest form */
.srm-guest-form { background: var(--srm-bg); border-radius: 14px; padding: 20px; margin: 0 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.srm-guest-form[hidden] { display: none; }
.srm-guest-form h3 { grid-column: 1 / -1; margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.srm-guest-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--srm-text-2); }
.srm-guest-form label:nth-of-type(3) { grid-column: 1 / -1; }
.srm-guest-form .srm-input { height: 40px; background: var(--srm-surface); }
.srm-optional { font-weight: 400; color: var(--srm-text-3); }
.srm-guest-form .srm-btn { grid-column: auto; }
.srm-guest-form__submit { grid-column: 1; justify-self: start; }
.srm-guest-form__cancel { grid-column: 2; justify-self: start; }

/* Tooltip */
.srm-tooltip { position: absolute; background: rgba(29,29,31,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; border-radius: 12px; box-shadow: var(--srm-shadow-lg); padding: 10px 13px; min-width: 150px; pointer-events: none; z-index: 999; animation: srm-fade .12s ease; }
.srm-tooltip[hidden] { display: none; }
@keyframes srm-fade { from { opacity: 0; } to { opacity: 1; } }
.srm-tooltip__name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.srm-tooltip__meta { font-size: 12px; color: rgba(255,255,255,.7); }
.srm-tooltip__price { font-size: 14px; font-weight: 700; margin-top: 5px; }
.srm-tooltip__status { font-size: 11.5px; margin-top: 3px; color: rgba(255,255,255,.7); }

/* Flash */
.srm-flash-msg { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #1d1d1f; color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 9999; box-shadow: var(--srm-shadow-lg); animation: srm-slide-up .2s ease; white-space: nowrap; }

/* Misc */
.srm-sr-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.srm-manifest { display: none; }
.srm-manifest h2 { font-size: 18px; margin: 0 0 12px; }
.srm-manifest__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.srm-manifest__table th, .srm-manifest__table td { border: 1px solid #ccc; padding: 6px 10px; text-align: left; }
.srm-manifest__table th { background: #f0f0f0; font-weight: 600; }
[dir="rtl"] .srm-summary-bar, [dir="rtl"] .srm-legend { flex-direction: row-reverse; }

/* Dark */
@media (prefers-color-scheme: dark) {
  .srm-map-wrap, html[data-theme="dark"] .srm-map-wrap { --srm-bg: #2c2c2e; --srm-surface: #1c1c1e; --srm-border: #3a3a3c; --srm-border-2: #48484a; --srm-text: #f5f5f7; --srm-text-2: #a1a1a6; --srm-text-3: #6e6e73; --srm-shadow-sm: 0 1px 2px rgba(0,0,0,.4); }
  .srm-dp-cell:hover, .srm-dp-prev:hover, .srm-dp-next:hover { background: #3a3a3c; }
  .srm-summary-bar { background: rgba(28,28,30,.9); }
  .srm-map__image--placeholder { background-color: #2c2c2e; }
  .srm-seat { stroke: rgba(0,0,0,.4) !important; }
}
html[data-theme="light"] .srm-map-wrap { --srm-bg: #f5f5f7; --srm-surface: #fff; --srm-border: #e5e5ea; --srm-border-2: #d2d2d7; --srm-text: #1d1d1f; --srm-text-2: #6e6e73; --srm-text-3: #aeaeb2; }

/* Responsive */
@media (max-width: 640px) {
  .srm-map-wrap { padding: 16px 16px 0; border-radius: 14px; }
  .srm-summary-bar { margin: 0 -16px; padding: 12px 16px; }
  .srm-toolbar .srm-filter-search { flex-basis: 100%; }
  .srm-toolbar__spacer { display: none; }
  .srm-guest-form { grid-template-columns: 1fr; }
  .srm-guest-form label:nth-of-type(3), .srm-guest-form__submit, .srm-guest-form__cancel { grid-column: 1; }
  .srm-summary-bar__btn { width: 100%; }
  .srm-time-slots { grid-template-columns: repeat(4, 1fr); }
  .srm-canvas-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Print */
@media print {
  .srm-summary-bar, .srm-guest-form, .srm-datepicker-wrap, .srm-toolbar { display: none; }
  body * { visibility: hidden; }
  .srm-map-wrap .srm-manifest, .srm-map-wrap .srm-manifest * { visibility: visible; }
  .srm-map-wrap .srm-manifest { display: block; position: absolute; left: 0; top: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .srm-map-wrap * { animation: none !important; transition: none !important; } }

/* Motion — seats settle in when a date is picked; a chosen seat pops once. */
.srm-seat, .srm-seat-label { transform-box: fill-box; transform-origin: center; }
.srm-seat--in { animation: srm-seat-in .42s cubic-bezier(.2,.7,.2,1) both; }
@keyframes srm-seat-in { from { opacity: 0; transform: translateY(6px) scale(.92); } to { transform: none; } }
.srm-seat--pop { animation: srm-seat-pop .3s cubic-bezier(.2,.8,.3,1.4); }
@keyframes srm-seat-pop { 0% { transform: scale(1); } 45% { transform: scale(1.08); } 100% { transform: scale(1); } }
.srm-time-slot { animation: srm-rise .3s ease both; }
.srm-time-slot:nth-child(2) { animation-delay: .03s; } .srm-time-slot:nth-child(3) { animation-delay: .06s; } .srm-time-slot:nth-child(4) { animation-delay: .09s; }
.srm-time-slot:nth-child(5) { animation-delay: .12s; } .srm-time-slot:nth-child(6) { animation-delay: .15s; } .srm-time-slot:nth-child(7) { animation-delay: .18s; } .srm-time-slot:nth-child(8) { animation-delay: .21s; }
.srm-time-slot:nth-child(n+9) { animation-delay: .24s; }
@keyframes srm-rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.srm-guest-form { animation: srm-rise .25s ease; }
.srm-dp-cell.is-selected { animation: srm-seat-pop .25s ease; }

/* ── Audit round ──────────────────────────────────────────────────────── */
.srm-date-hint { position: static; transform: none; display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; max-width: 100%; animation: srm-rise .2s ease; }
.srm-date-hint::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff9f0a; }
.srm-canvas-container.is-locked { opacity: .55; }
.srm-canvas-container.is-locked .srm-seat { cursor: not-allowed; }
.srm-timepicker:empty { display: block; margin-top: 12px; padding: 14px; border: 1px dashed var(--srm-border-2); border-radius: 10px; font-size: 13px; color: var(--srm-text-3); text-align: center; }
.srm-timepicker:empty::before { content: attr(data-empty); }
.srm-map-wrap--form-open .srm-summary-bar__btn, .srm-map-wrap--form-open .srm-party-wrap { display: none; }
.srm-guest-form .srm-label { display: flex; gap: 6px; align-items: baseline; }
.srm-guest-form .srm-optional { font-style: normal; font-weight: 400; color: var(--srm-text-3); }
.srm-guest-form__note { grid-column: 1 / -1; }
.srm-guest-form label:nth-of-type(3) { grid-column: auto; }
.srm-guest-form textarea.srm-input { height: auto; min-height: 64px; padding: 10px 12px; resize: vertical; font: inherit; }
.srm-guest-form__actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.srm-guest-form__submit, .srm-guest-form__cancel { grid-column: auto; }
.srm-map-wrap .srm-input.is-invalid { border-color: var(--srm-reserved); box-shadow: 0 0 0 3px rgba(255,59,48,.16); }
.srm-field-error { font-size: 12px; font-weight: 500; color: #c62828; }
.srm-confirmation { background: var(--srm-bg); border-radius: 14px; padding: 22px; margin: 0 0 22px; animation: srm-rise .3s ease; }
.srm-confirmation[hidden] { display: none; }
.srm-confirmation__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.srm-confirmation__head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.srm-confirmation__check { width: 30px; height: 30px; border-radius: 50%; background: var(--srm-avail); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; animation: srm-seat-pop .4s cubic-bezier(.2,.8,.3,1.4); }
.srm-confirmation__lead { color: var(--srm-text-2); margin-bottom: 14px; }
.srm-confirmation__dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; font-size: 14px; }
.srm-confirmation__dl dt { color: var(--srm-text-2); } .srm-confirmation__dl dd { margin: 0; font-weight: 600; }
.srm-confirmation__actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .srm-guest-form label:nth-of-type(3) { grid-column: 1; } }
@media (min-width: 860px) {
  .srm-map-body--with-date { grid-template-rows: auto 1fr; }
  .srm-map-body--with-date .srm-datepicker-wrap { grid-row: 1 / span 2; grid-column: 1; }
  .srm-map-body--with-date .srm-date-hint { grid-column: 2; justify-self: start; margin-bottom: 0; }
  .srm-map-body--with-date .srm-canvas-container { grid-column: 2; }
}
.srm-confirmation__actions .srm-btn { height: 42px; padding: 0 18px; }
.srm-map-wrap .srm-guest-form__cancel { background: transparent; border: 1px solid var(--srm-border-2); }
