/* Tamil + Sinhala fonts (used automatically when the page language is ta / si) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Tamil:wght@400;500;600;700;800&family=Noto+Sans+Sinhala:wght@400;500;600;700;800&display=swap');
html[lang="ta"] body, html[lang="ta"] input, html[lang="ta"] button, html[lang="ta"] select, html[lang="ta"] textarea { font-family: 'Noto Sans Tamil', 'Inter', sans-serif; }
html[lang="si"] body, html[lang="si"] input, html[lang="si"] button, html[lang="si"] select, html[lang="si"] textarea { font-family: 'Noto Sans Sinhala', 'Inter', sans-serif; }

/* Tamil / Sinhala words are longer: let button labels wrap instead of overflowing */
html[lang="ta"] label.flex, html[lang="si"] label.flex { text-align: center; line-height: 1.3; overflow-wrap: anywhere; }


/* SpeedMart.lk - small custom tweaks on top of Tailwind (CDN) */

/* ---------------------------------------------------------
   Brand variables. --black is #111111 (near-black) so the
   yellow (#F5A800) pops without the harshness of pure #000.
--------------------------------------------------------- */
:root {
    --yellow: #F5A800;
    --yellow-bg: #FFF8E1;
    --yellow-light: #FFF3CC;
    --black: #111111;
    --white: #ffffff;
    --green: #1D9E75;
    --green-light: #E1F5EE;
    --green-dark: #0F6E56;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body {
    background: var(--black);
    color: var(--white);
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ---------------------------------------------------------
   CSS-only modal popups (no JavaScript needed).
   Each modal is a normal hidden <div id="...">; linking to
   "#thatId" anywhere on the page makes the browser jump to it,
   and :target reveals it as a centered overlay. Linking to "#"
   clears the target and hides it again.
--------------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}
.modal-overlay:target {
    display: flex;
}

/* ---------------------------------------------------------
   Restaurant page: the small photo strip next to the logo in
   the nav bar auto-scrolls sideways on a continuous loop.
   The track is the photo list duplicated once, so the loop
   from -50% back to 0% is seamless.
--------------------------------------------------------- */
.photo-strip {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
            mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
}
.photo-strip-track {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    width: max-content;
    animation: photo-strip-scroll 14s linear infinite;
}
/* Explicit sizing so the strip stays a tidy horizontal row of
   thumbnails even if the Tailwind CDN script hasn't applied yet
   (slow network, cache, etc.) — this no longer relies only on
   the w-11/h-11 utility classes in the markup. */
.photo-strip-track img {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 1px solid #374151;
}
.photo-strip:hover .photo-strip-track {
    animation-play-state: paused;
}
@keyframes photo-strip-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------------------------------------------------------
   Restaurant page: the 4-box photo grid next to the main hero
   image. Each grid cell (.photo-rotate-cell) stacks its photos
   on top of each other; the @keyframes "photo-rotate" (defined
   inline in restaurant.php, since it depends on how many photos
   the restaurant has) then slides/fades one photo at a time into
   view. Without this block the images just sat stacked with no
   visible animation, which is what was fixed here.
--------------------------------------------------------- */
.photo-rotate-cell {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
    background: #1f2937;
}
.photo-rotate-cell img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation-name: photo-rotate;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    will-change: transform, opacity;
}

/* Dashboard: soft-deleted photo slots are shown dimmed and
   greyscale so it's obvious the slot is "removed" but not
   permanently gone. */
.photo-slot-deleted {
    opacity: 0.45;
    filter: grayscale(1);
}

/* ---------------------------------------------------------
   Bottom nav (Home / Categories / Search / Location): same yellow
   drop-shadow on every page instead of the plain grey shadow-lg,
   so the bar visually "lifts" off the page in the brand color.
--------------------------------------------------------- */
.bottom-nav-shadow {
    box-shadow: 0 -8px 24px -4px rgba(245, 158, 11, 0.45), 0 -2px 8px rgba(217, 119, 6, 0.3);
}

.top-nav-shadow {
    box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.45), 0 2px 8px rgba(217, 119, 6, 0.3);
}

/* ---------------------------------------------------------
   Content cards (menu list, order summary, details form, etc.):
   same lifted look as the nav bars, but in black, per request.
--------------------------------------------------------- */
.card-shadow-black {
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* ---------------------------------------------------------
   Tailwind's bg-black is pure #000. Override it everywhere
   (header, footer, page, cards, modals) with the brand
   near-black #111111 so the whole site matches.
--------------------------------------------------------- */
.bg-black {
    background-color: var(--black) !important;
}


/* ---------------------------------------------------------
   ONE shared rule for the top navigation bar AND the footer,
   so their background and yellow line can never differ.
--------------------------------------------------------- */
.sm-bar {
    background-color: #111111 !important;
    border-color: #F5A800 !important;
}

/* ---------------------------------------------------------
   Top bar, footer and every SpeedMart logo (nav, footer, login
   popup) share ONE look: flat #111111, brand yellow #F5A800,
   no glow / shadow / dimming, so they can never drift apart.
--------------------------------------------------------- */
.sm-bar {
    background-color: #111111 !important;
    border-color: #F5A800 !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
}
.sm-logo, .sm-logo * {
    opacity: 1 !important;
    filter: none !important;
    text-shadow: none !important;
}
.sm-logo .sm-speed,
.sm-logo .sm-lk   { color: #F5A800 !important; }
.sm-logo .sm-mart { color: #ffffff !important; }

/* ---------------------------------------------------------
   Mobile safety: the page must never be wider than the phone
   screen (otherwise the page slides sideways and buttons such
   as Logout end up off-screen).
--------------------------------------------------------- */
html { max-width: 100%; overflow-x: hidden; }
body { max-width: 100%; overflow-x: clip; }
img, video, canvas, svg { max-width: 100%; }
@media (max-width: 639px) {
    /* top bar buttons a little smaller + closer so they fit in one or two rows */
    #top .max-w-7xl > div > div { gap: 6px; }
    #top .max-w-7xl a, #top .max-w-7xl button { padding-left: 10px; padding-right: 10px; }
    /* wide tables scroll inside themselves instead of widening the page */
    main table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    /* long words / numbers must wrap */
    main { overflow-wrap: anywhere; }
}