:root { color-scheme: light; }
html, body { width: 100%; min-height: 0; margin: 0; overflow: hidden; }
body.rzbw-page { background: transparent; }
body.rzbw-page--standalone {
    min-height: 100dvh; overflow: auto; display: grid; justify-items: center; align-items: start; padding: clamp(16px, 4vw, 52px);
    background-color: var(--rzbw-global-background, #eef1f5);
    background-image: var(--rzbw-global-background-image, none);
    background-size: var(--rzbw-global-background-size, cover);
    background-position: var(--rzbw-global-background-position, center center);
    background-repeat: var(--rzbw-global-background-repeat, no-repeat);
    background-attachment: fixed;
}
body.rzbw-page--standalone .rzbw-root { width: min(880px, 100%); max-height: none; border-radius: var(--rzbw-radius); box-shadow: 0 24px 80px rgba(16, 28, 48, .22); }
body.rzbw-page--standalone .rzbw-close { display: none; }
.rzbw-root, .rzbw-root * { box-sizing: border-box; }
.rzbw-root {
    --rzbw-primary: #315ff4; --rzbw-background: #fffaf0; --rzbw-surface: #fff;
    --rzbw-text: #172033; --rzbw-muted: #778398; --rzbw-radius: 16px;
    width: 100%; height: auto; max-height: 100dvh; min-height: 0; padding: 0; overflow-y: auto;
    display: block;
    color: var(--rzbw-text); font-family: var(--rzbw-font, Inter, "Segoe UI", Arial, sans-serif);
    background-color: var(--rzbw-background);
}
.rzbw-shell {
    position: relative; width: 100%; min-height: 0; overflow: hidden;
    border: 0; border-radius: 0; background: var(--rzbw-background);
    background-image: var(--rzbw-background-image, none); background-size: cover; background-position: center;
    box-shadow: none;
}
.rzbw-close {
    position: fixed; z-index: 5; top: 12px; right: 12px; width: 38px; height: 38px;
    margin: 0; padding: 0; border: 1px solid color-mix(in srgb, var(--rzbw-text) 14%, transparent);
    border-radius: 11px; background: color-mix(in srgb, var(--rzbw-background) 90%, white);
    cursor: pointer; appearance: none;
}
.rzbw-close span { position: absolute; top: 18px; left: 10px; width: 17px; height: 1.5px; border-radius: 2px; background: var(--rzbw-text); transform: rotate(45deg); }
.rzbw-close span + span { transform: rotate(-45deg); }
.rzbw-form { margin: 0; padding: 28px; }
.rzbw-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; align-items: start; }
.rzbw-block { grid-column: span var(--rzbw-span, 12); min-width: 0; }
.rzbw-header-block { margin: -4px 0 4px; }
.rzbw-header {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center;
    gap: 12px; min-height: 66px; padding: var(--rzbw-header-padding, 0); padding-right: 48px;
    border-radius: calc(var(--rzbw-radius) - 5px); background: var(--rzbw-header-bg, transparent);
}
.rzbw-header-logo { grid-column: var(--rzbw-logo-start, 1) / span var(--rzbw-logo-span, 2); grid-row: var(--rzbw-logo-row, 1); min-width: 0; display: flex; justify-content: var(--rzbw-logo-align, center); }
.rzbw-header-logo img { display: block; width: var(--rzbw-logo-size, 48px); height: var(--rzbw-logo-size, 48px); max-width: 100%; object-fit: contain; border-radius: 12px; }
.rzbw-header-logo.rzbw-logo-missing { display: none; }
.rzbw-header-copy { grid-column: var(--rzbw-text-start, 3) / span var(--rzbw-text-span, 10); grid-row: var(--rzbw-text-row, 1); min-width: 0; text-align: var(--rzbw-text-align, left); }
.rzbw-align-left .rzbw-header-copy { text-align: left; }
.rzbw-align-center .rzbw-header-copy { text-align: center; }
.rzbw-align-right .rzbw-header-copy { text-align: right; }
.rzbw-eyebrow { margin-bottom: 5px; color: var(--rzbw-muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rzbw-header h1, .rzbw-result h1 { margin: 0; color: var(--rzbw-text); font-size: clamp(22px, 3.2vw, 28px); line-height: 1.1; }
.rzbw-header p { margin: 6px 0 0; color: var(--rzbw-muted); font-size: 14px; }
.rzbw-field label, .rzbw-time h2, .rzbw-restaurants h2 {
    display: block; margin: 0 0 6px; color: var(--rzbw-text); font-size: 10px; font-weight: 700;
}
.rzbw-field label span, .rzbw-time h2 span { color: var(--rzbw-primary); }
.rzbw-field input, .rzbw-field textarea {
    display: block; width: 100%; min-width: 0; height: var(--rzbw-control-height, 44px); margin: 0;
    padding: 0 14px; border: 1px solid color-mix(in srgb, var(--rzbw-text) 18%, transparent);
    border-radius: var(--rzbw-control-radius, 10px); outline: none; background: var(--rzbw-surface); color: var(--rzbw-text);
    font: inherit; font-size: 15px; line-height: 1.35; appearance: auto;
}
.rzbw-field textarea { height: auto; min-height: var(--rzbw-control-height, 72px); padding-top: 12px; resize: none; }
.rzbw-field input::placeholder, .rzbw-field textarea::placeholder { color: color-mix(in srgb, var(--rzbw-muted) 80%, transparent); }
.rzbw-field input:focus, .rzbw-field textarea:focus { border-color: var(--rzbw-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rzbw-primary) 14%, transparent); }
.rzbw-field.is-invalid input, .rzbw-field.is-invalid textarea { border-color: #dd4053; box-shadow: 0 0 0 3px rgba(221, 64, 83, .1); }
.rzbw-field-error { display: block; min-height: 0; margin-top: 5px; color: #c9384b; font-size: 10px; line-height: 1.3; }
.rzbw-field-error:empty { display: none; }
.rzbw-time h2, .rzbw-restaurants h2 { font-size: 10px; }
.rzbw-slots { display: grid; grid-template-columns: repeat(var(--rzbw-slot-cols, 4), minmax(0, 1fr)); gap: var(--rzbw-slot-gap, 8px); }
.rzbw-time:not(.rzbw-time-slider):not(.rzbw-time-compact) .rzbw-slots { min-height: var(--rzbw-slots-min-height, 130px); align-content: start; }
.rzbw-time-slider .rzbw-slots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rzbw-time-slider .rzbw-slot { flex: 0 0 auto; min-width: 92px; scroll-snap-align: start; }
.rzbw-time-compact .rzbw-slots { display: flex; flex-wrap: wrap; }
.rzbw-time-compact .rzbw-slot, .rzbw-time-pills .rzbw-slot { min-height: 36px; padding: 6px 12px; border-radius: 999px; }
.rzbw-slot {
    min-height: 38px; margin: 0; padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--rzbw-text) 17%, transparent);
    border-radius: var(--rzbw-slot-radius, 10px); background: var(--rzbw-surface); color: var(--rzbw-text);
    font: inherit; font-size: 14px; cursor: pointer; appearance: none;
}
.rzbw-slot:hover { border-color: var(--rzbw-primary); }
.rzbw-slot.is-selected { border-color: var(--rzbw-primary); background: var(--rzbw-primary); color: #fff; }
.rzbw-empty-slots { min-height: 64px; display: grid; place-items: center; padding: 14px; border: 1px dashed color-mix(in srgb, var(--rzbw-text) 17%, transparent); border-radius: 10px; color: var(--rzbw-muted); text-align: center; font-size: 14px; }
.rzbw-slot-pages { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 10px; }
.rzbw-slot-pages button { width: 96px; min-height: 38px; padding: 7px 14px; border: 1px solid var(--rzbw-primary); border-radius: var(--rzbw-slot-radius, 10px); background: transparent; color: var(--rzbw-primary); font: inherit; font-weight: 700; cursor: pointer; }
.rzbw-slot-pages button:first-child { justify-self: start; }.rzbw-slot-pages button:last-child { justify-self: end; }.rzbw-slot-pages button:disabled { opacity: .4; cursor: default; }.rzbw-slot-pages span { color: var(--rzbw-muted); font-size: 12px; white-space: nowrap; }
.rzbw-submit, .rzbw-secondary {
    min-height: 44px; margin: 0; padding: 10px 18px; border: 1px solid var(--rzbw-primary); border-radius: 10px;
    background: var(--rzbw-primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer; appearance: none; text-decoration: none;
}
.rzbw-submit-block .rzbw-submit { width: 100%; min-height: var(--rzbw-submit-height, 48px); border-radius: var(--rzbw-submit-radius, 10px); }
.rzbw-submit:disabled { opacity: .5; cursor: wait; }
.rzbw-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 12px; background: transparent; color: var(--rzbw-primary); font-size: 13px; }
.rzbw-copy { color: var(--rzbw-text); font-size: 15px; line-height: 1.55; }
.rzbw-copy a { color: var(--rzbw-primary); text-decoration: underline; text-underline-offset: 2px; }
.rzbw-divider hr { margin: 4px 0; border: 0; border-top: 1px solid color-mix(in srgb, var(--rzbw-text) 13%, transparent); }
.rzbw-restaurant-grid { display: grid; grid-template-columns: repeat(var(--rzbw-nearest-cols, 2), minmax(0, 1fr)); gap: var(--rzbw-nearest-gap, 10px); }
.rzbw-restaurants-list .rzbw-restaurant-grid { grid-template-columns: 1fr; }
.rzbw-restaurant-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: var(--rzbw-nearest-padding, 13px); border: 1px solid var(--rzbw-nearest-border, color-mix(in srgb, var(--rzbw-text) 14%, transparent)); border-radius: var(--rzbw-nearest-radius, 12px); background: var(--rzbw-nearest-bg, var(--rzbw-surface)); }
.rzbw-restaurant-card strong, .rzbw-restaurant-card span, .rzbw-restaurant-card div > a { display: block; }
.rzbw-restaurant-card span, .rzbw-restaurant-card div > a { margin-top: 3px; color: var(--rzbw-muted); font-size: 12px; text-decoration: none; }
.rzbw-restaurant-card em { display: block; margin-top: 6px; color: var(--rzbw-primary); font-size: 12px; font-style: normal; font-weight: 700; }
.rzbw-progress { padding: 22px 28px 0; color: var(--rzbw-muted); font-size: 12px; font-weight: 700; }
.rzbw-progress div { display: flex; gap: 5px; margin-top: 8px; }
.rzbw-progress i { flex: 1; height: 4px; border-radius: 5px; background: color-mix(in srgb, var(--rzbw-muted) 25%, transparent); }
.rzbw-progress i.is-active { background: var(--rzbw-primary); }
.rzbw-step-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.rzbw-message { display: block; margin-top: 12px; color: var(--rzbw-muted); font-size: 9px; line-height: 1.4; text-align: center; }
.rzbw-result { min-height: 360px; padding: 72px 28px 40px; text-align: center; }
.rzbw-result-icon { width: 58px; height: 58px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 18px; background: #e5f7ef; color: #07945f; font-size: 28px; font-weight: 800; }
.rzbw-result-icon.error { background: #fff0f2; color: #dd4053; }
.rzbw-result p { max-width: 520px; margin: 12px auto 26px; color: var(--rzbw-muted); line-height: 1.55; }
.rzbw-hide-desktop { display: none; }

@media (max-width: 640px) {
    .rzbw-root { height: auto; max-height: 100dvh; min-height: 0; padding: 0; }
    .rzbw-shell { width: 100%; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
    .rzbw-form { padding: 24px 18px; }
    .rzbw-grid { gap: 14px 10px; }
    .rzbw-block { grid-column: span var(--rzbw-mobile-span, 12); }
    .rzbw-header { padding-right: 42px; }
    .rzbw-header-logo { grid-column: var(--rzbw-logo-mobile-start, 1) / span var(--rzbw-logo-mobile-span, 12); grid-row: var(--rzbw-logo-mobile-row, 1); justify-content: var(--rzbw-logo-mobile-align, center); }
    .rzbw-header-copy { grid-column: var(--rzbw-text-mobile-start, 1) / span var(--rzbw-text-mobile-span, 12); grid-row: var(--rzbw-text-mobile-row, 2); text-align: var(--rzbw-text-mobile-align, left); }
    .rzbw-hide-desktop { display: initial; }
    .rzbw-hide-mobile { display: none !important; }
    .rzbw-slots { grid-template-columns: repeat(var(--rzbw-slot-mobile-cols, 2), minmax(0, 1fr)); }
    .rzbw-restaurant-grid { grid-template-columns: repeat(var(--rzbw-nearest-mobile-cols, 1), minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) { .rzbw-root * { scroll-behavior: auto !important; transition: none !important; } }
