/* Public booking storefront (`/book/{venue_slug}`): small overrides layered
   on top of Tailwind (CDN) + the shared time-slot-picker component, to match
   the Slate/Indigo e-commerce design system for this screen specifically. */

@font-face {
    font-family: "Ubuntu";
    src: url("/static/fonts/Ubuntu-Light-Small.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ubuntu";
    src: url("/static/fonts/Ubuntu-Regular-Small.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ubuntu";
    src: url("/static/fonts/Ubuntu-Medium-Small.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ubuntu";
    src: url("/static/fonts/Ubuntu-Bold-Small.ttf") format("truetype");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: "Ubuntu", sans-serif;
}

button,
input,
select,
textarea,
option,
optgroup {
    font-family: inherit;
    font-size: inherit;
}

/* Per-venue brand color theming: `--venue-primary` is set inline (see
   `layouts/public_booking.html`) from the venue's `primary_color` (hex +
   alpha, e.g. "#4F46E5FF"), falling back to the original indigo accent.
   These utility classes replace the previously hard-coded
   `bg-indigo-600`/`text-indigo-600`/etc Tailwind classes on every
   "primary" button/link across the public storefront templates, so the
   whole surface reflects the lojista's configured color instead. Uses
   `color-mix()` (broadly supported in evergreen mobile browsers) to derive
   hover/shadow/ring shades without needing a second stored color. */
:root {
    --venue-primary: #4F46E5FF;
}

/* Item 2.1: storefront card background tint requested by the lojista. */
.public-booking-surface {
    background-color: #F3F4F8;
}

/* Light-theme palette: soft cool-gray page and footer around a lighter
   surface, so white header/cards keep a clear but gentle contrast. */
html:not([data-theme="dark"]) body,
html:not([data-theme="dark"]) footer {
    background-color: #E9ECF2;
}

.venue-primary-bg {
    background-color: var(--venue-primary);
}

.venue-primary-bg:hover {
    background-color: color-mix(in srgb, var(--venue-primary) 85%, black);
}

.venue-primary-bg-soft {
    background-color: color-mix(in srgb, var(--venue-primary) 8%, white);
}

.venue-primary-bg-soft:hover {
    background-color: color-mix(in srgb, var(--venue-primary) 14%, white);
}

.venue-primary-text {
    color: var(--venue-primary);
}

.venue-primary-text:hover {
    color: color-mix(in srgb, var(--venue-primary) 85%, black);
}

.venue-primary-border {
    border-color: var(--venue-primary);
}

.venue-primary-ring {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--venue-primary) 10%, transparent);
}

.venue-primary-shadow {
    box-shadow: 0 10px 15px -3px color-mix(in srgb, var(--venue-primary) 25%, transparent);
}

.venue-primary-focus:focus {
    border-color: var(--venue-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--venue-primary) 20%, transparent);
    outline: none;
}

.venue-primary-text-hover:hover {
    color: color-mix(in srgb, var(--venue-primary) 85%, black);
}

.venue-primary-bg-soft-hover:hover {
    background-color: color-mix(in srgb, var(--venue-primary) 8%, white);
}

.venue-card-hover:hover {
    border-color: color-mix(in srgb, var(--venue-primary) 40%, white);
    box-shadow: 0 10px 15px -3px color-mix(in srgb, var(--venue-primary) 5%, transparent);
}

@keyframes public-booking-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: public-booking-fade-in 0.15s ease-out;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Re-skin the shared time-slot-picker to the Slate/Indigo palette used by
   the public booking checkout modal, per the design brief. */
#public-modal-root .time-slot-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 640px) {
    #public-modal-root .time-slot-picker-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

#public-modal-root .time-slot-button {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background-color: #ffffff;
    color: #334155;
    font-weight: 600;
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

#public-modal-root .time-slot-button:hover {
    border-color: #a5b4fc;
    background-color: rgba(238, 242, 255, 0.5);
}

#public-modal-root .time-slot-button-selected {
    background-color: var(--venue-primary);
    border-color: var(--venue-primary);
    color: #ffffff;
    box-shadow: 0 4px 8px color-mix(in srgb, var(--venue-primary) 20%, transparent);
    transform: scale(1.02);
}

#public-modal-root .time-slot-button-selected:hover {
    background-color: color-mix(in srgb, var(--venue-primary) 88%, black);
    border-color: color-mix(in srgb, var(--venue-primary) 88%, black);
    color: #ffffff;
}

#public-modal-root .time-slot-picker-custom-input,
#public-modal-root .time-slot-picker-date-label {
    color: #1e293b;
}

/* Venue announcements (venue_announcements table), rendered on the public
   storefront just below the header when currently active (enabled + within
   their display window — filtering happens server-side). Each `design_style`
   maps to a distinct, lightweight color treatment; images are optional and
   may be paired with text or shown alone. */
.announcement-banner {
    position: relative;
    border-radius: 1rem;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    border: 1px solid transparent;
}

.announcement-banner-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: currentColor;
    opacity: 0.6;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.announcement-banner-close:hover,
.announcement-banner-close:focus-visible {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.06);
}

.announcement-banner-image {
    width: 100%;
    border-radius: 0.75rem;
    object-fit: cover;
    display: block;
}

.announcement-banner-image + .announcement-banner-content {
    margin-top: 0.5rem;
}

.announcement-banner-content {
    margin: 0;
}

.announcement-banner-default {
    background-color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.35);
    color: #334155;
}

.announcement-banner-info {
    background-color: #eff6ff;
    border-color: rgba(59, 130, 246, 0.25);
    color: #1e40af;
}

.announcement-banner-warning {
    background-color: #fffbeb;
    border-color: rgba(245, 158, 11, 0.3);
    color: #92400e;
}

.announcement-banner-success {
    background-color: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.3);
    color: #065f46;
}

.announcement-banner-promo {
    background: linear-gradient(135deg, color-mix(in srgb, var(--venue-primary) 12%, white), color-mix(in srgb, var(--venue-primary) 4%, white));
    border-color: color-mix(in srgb, var(--venue-primary) 30%, transparent);
    color: color-mix(in srgb, var(--venue-primary) 75%, black);
}

/* Product modal image carousel: plain CSS transform-based slider (no
   external library), kept intentionally simple/cheap for low-end mobile
   devices. Slides are laid out in a flex row and the track is translated
   by JS (see `initCarousel` in public_booking.js). */
.public-carousel {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.public-carousel-track {
    display: flex;
    transition: transform 0.25s ease;
}

.public-carousel-image {
    width: 100%;
    height: 13rem;
    object-fit: cover;
    flex: 0 0 100%;
}

.public-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: rgba(15, 23, 42, 0.45);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    border: none;
    cursor: pointer;
}

.public-carousel-prev {
    left: 0.5rem;
}

.public-carousel-next {
    right: 0.5rem;
}

.public-carousel-dots {
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.375rem;
}

.public-carousel-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.public-carousel-dot-active {
    background-color: #ffffff;
}

/* ---------------------------------------------------------------------- */
/* Dark theme overrides                                                    */
/* ---------------------------------------------------------------------- */
/* Activated via `data-theme="dark"` on <html> (see the no-flash script in
   `layouts/public_booking.html`), resolved from the venue's `theme` setting
   ("light" | "dark" | "auto"). Rather than adding Tailwind `dark:` variants
   to every template (no build step / Tailwind CDN, many templates), these
   rules override Tailwind's generated utility classes directly: an
   attribute-selector + class-selector pair (specificity 0,2,0) always beats
   a single Tailwind utility class selector (0,1,0), regardless of CSS load
   order, so no template markup needs to change. `--venue-primary` (the
   lojista's brand color) is intentionally left untouched here — dark mode
   only restyles surrounding chrome (backgrounds/text/borders), never the
   venue's configured primary color/buttons.

   Palette: a neutral "zinc" scale (warmer/more modern than the previous
   navy-leaning slate tones), inspired by contemporary dark UIs (GitHub,
   Linear, Vercel). Hover/soft states use a dedicated `--dark-hover`/
   `--dark-hover-strong` tone instead of mixing with white, which is what
   caused the low-contrast/"washed out" hover look in the first version. */

[data-theme="dark"] {
    color-scheme: dark;
    --dark-bg: #101012;
    --dark-surface: #1c1c1f;
    --dark-surface-raised: #232327;
    --dark-border: #333338;
    --dark-border-soft: rgba(255, 255, 255, 0.08);
    --dark-hover: #2a2a2f;
    --dark-hover-strong: #333338;
    --dark-text: #f4f4f5;
    --dark-text-muted: #a1a1aa;
    --dark-text-subtle: #71717a;
}

[data-theme="dark"] body {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

[data-theme="dark"] .public-booking-surface {
    background-color: var(--dark-surface);
}

/* Backgrounds */
[data-theme="dark"] .bg-white {
    background-color: var(--dark-surface-raised);
}

[data-theme="dark"] .bg-slate-50 {
    background-color: var(--dark-bg);
}

[data-theme="dark"] .bg-slate-100 {
    background-color: var(--dark-hover);
}

[data-theme="dark"] .bg-slate-200 {
    background-color: var(--dark-hover-strong);
}

[data-theme="dark"] .bg-slate-300 {
    background-color: #52525b;
}

[data-theme="dark"] .bg-slate-900\/50 {
    background-color: rgba(0, 0, 0, 0.72);
}

[data-theme="dark"] .bg-emerald-50 {
    background-color: rgba(16, 185, 129, 0.14);
}

[data-theme="dark"] .bg-emerald-100 {
    background-color: rgba(16, 185, 129, 0.22);
}

[data-theme="dark"] .bg-amber-50 {
    background-color: rgba(245, 158, 11, 0.14);
}

[data-theme="dark"] .bg-rose-50 {
    background-color: rgba(244, 63, 94, 0.14);
}

/* Hover-state utilities (Tailwind `hover:` variants aren't covered by the
   plain utility overrides above since they only apply on `:hover`). Without
   these, elements like the category accordion header
   (`hover:bg-slate-50`) would resolve to Tailwind's light-mode hover
   background — a near-white tone that clashes with the white label text
   above it, killing contrast on hover. */
[data-theme="dark"] .hover\:bg-slate-50:hover {
    background-color: var(--dark-hover);
}

[data-theme="dark"] .hover\:bg-slate-200:hover {
    background-color: var(--dark-hover-strong);
}

[data-theme="dark"] .hover\:border-slate-300:hover {
    border-color: #52525b;
}

[data-theme="dark"] .hover\:text-slate-600:hover {
    color: var(--dark-text);
}

/* Text */
[data-theme="dark"] .text-slate-900 {
    color: var(--dark-text);
}

[data-theme="dark"] .text-slate-800 {
    color: #e4e4e7;
}

[data-theme="dark"] .text-slate-700 {
    color: #d4d4d8;
}

[data-theme="dark"] .text-slate-600 {
    color: var(--dark-text-muted);
}

[data-theme="dark"] .text-slate-500 {
    color: var(--dark-text-muted);
}

[data-theme="dark"] .text-slate-400 {
    color: var(--dark-text-subtle);
}

[data-theme="dark"] .text-emerald-600,
[data-theme="dark"] .text-emerald-700 {
    color: #34d399;
}

[data-theme="dark"] .text-amber-800 {
    color: #fbbf24;
}

[data-theme="dark"] .text-rose-600,
[data-theme="dark"] .text-rose-700 {
    color: #fb7185;
}

/* Borders / rings */
[data-theme="dark"] .border-slate-100,
[data-theme="dark"] .border-slate-200,
[data-theme="dark"] .border-slate-300 {
    border-color: var(--dark-border);
}

[data-theme="dark"] .border-slate-200\/70,
[data-theme="dark"] .border-slate-200\/80 {
    border-color: var(--dark-border-soft);
}

[data-theme="dark"] .ring-slate-100 {
    --tw-ring-color: var(--dark-border);
}

[data-theme="dark"] .ring-emerald-600\/20 {
    --tw-ring-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .ring-amber-600\/20 {
    --tw-ring-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .ring-rose-600\/20 {
    --tw-ring-color: rgba(244, 63, 94, 0.3);
}

/* Brand-color "soft"/hover utilities: in light mode these mix the venue's
   primary color with white; in dark mode mixing with white produces a
   near-white, low-contrast surface, so they mix with the dark surface tone
   instead. */
[data-theme="dark"] .venue-primary-bg-soft {
    background-color: color-mix(in srgb, var(--venue-primary) 16%, var(--dark-surface-raised));
}

[data-theme="dark"] .venue-primary-bg-soft:hover,
[data-theme="dark"] .venue-primary-bg-soft-hover:hover {
    background-color: color-mix(in srgb, var(--venue-primary) 24%, var(--dark-surface-raised));
}

[data-theme="dark"] .venue-card-hover:hover {
    border-color: color-mix(in srgb, var(--venue-primary) 50%, var(--dark-border));
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.45);
}

/* Custom (non-Tailwind) component classes */
[data-theme="dark"] #public-modal-root .time-slot-button {
    background-color: var(--dark-surface-raised);
    border-color: var(--dark-border);
    color: #e4e4e7;
}

[data-theme="dark"] #public-modal-root .time-slot-button:hover {
    border-color: color-mix(in srgb, var(--venue-primary) 55%, var(--dark-border));
    background-color: color-mix(in srgb, var(--venue-primary) 14%, var(--dark-hover));
}

[data-theme="dark"] #public-modal-root .time-slot-button-selected {
    color: #ffffff;
}

[data-theme="dark"] #public-modal-root .time-slot-picker-custom-input,
[data-theme="dark"] #public-modal-root .time-slot-picker-date-label {
    color: var(--dark-text);
}

[data-theme="dark"] .public-carousel {
    border-color: var(--dark-border);
}

[data-theme="dark"] .announcement-banner-close:hover,
[data-theme="dark"] .announcement-banner-close:focus-visible {
    background-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .announcement-banner-default {
    background-color: var(--dark-surface-raised);
    border-color: var(--dark-border-soft);
    color: #d4d4d8;
}

[data-theme="dark"] .announcement-banner-info {
    background-color: rgba(59, 130, 246, 0.14);
    border-color: rgba(96, 165, 250, 0.35);
    color: #93c5fd;
}

[data-theme="dark"] .announcement-banner-warning {
    background-color: rgba(245, 158, 11, 0.14);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fbbf24;
}

[data-theme="dark"] .announcement-banner-success {
    background-color: rgba(16, 185, 129, 0.14);
    border-color: rgba(52, 211, 153, 0.35);
    color: #6ee7b7;
}

[data-theme="dark"] .announcement-banner-promo {
    background: linear-gradient(135deg, color-mix(in srgb, var(--venue-primary) 26%, var(--dark-surface-raised)), color-mix(in srgb, var(--venue-primary) 10%, var(--dark-surface-raised)));
    color: color-mix(in srgb, var(--venue-primary) 70%, white);
}

/* Footer brand logos: the light-theme treatment (`invert opacity-40`)
   inverts the logos' white background to black and their black artwork to
   white, then dims everything to a subtle 40% opacity — the inverted
   black background blends softly into the near-black dark footer without
   needing any extra CSS, but the inverted (white) artwork needs a higher
   opacity to stay legible against that dark backdrop. Deliberately not
   using `brightness(0) invert(1)` here: that flattens every opaque pixel
   to a single color, which destroys the artwork entirely on `app_logo.png`
   (a fully opaque PNG with no transparency) instead of a transparent one. */
[data-theme="dark"] footer img {
    opacity: 0.85;
}

[data-theme="dark"] footer .bomdev-img {
      filter: brightness(1.2);
}



/* The Bookspot logo is black artwork on transparent: it stays black in the
   light theme and is inverted to white only in dark mode. */
[data-theme="dark"] footer .app-logo-img {
    filter: invert(1);
}

/* The loading hint must not reserve space between the header and the services. */
#public-products-loading {
    display: none;
}

#public-products-loading.htmx-request {
    display: block;
}
