/* ==========================================================================
   responsive.css: tablet and phone layer for the frontend
   --------------------------------------------------------------------------
   Loaded after style.css and dev.css (elements/header.php). style.css is the
   approved desktop design and keeps the breakpoint rules written with it;
   this file only adds rules below 1201px, so desktop is not affected.

   Breakpoints
     1199  small laptops / tablet landscape: header fits on one line
      991  tablets: burger drawer, compact header buttons
      767  phones: Figma "Home - Mobile" (node 8119:3860, 375px wide)
      374  narrow phones (320-374)

   The home game uses the phone menu (elements/mobile-game-menu.php +
   js/mobile-ui.js). Its rules are scoped to .mgm-layout, which
   home.php puts on #Dreidel whenever that menu is rendered (not in the
   raffle-only bottom panel), so countdown/announcement pages that share
   .banner-inner / .middle-panel are left as they were.
   ========================================================================== */

:root {
    --m-navy: #110f22;
    --m-panel: #211d3b;
    --m-purple: #392884;
    --m-raffle: #382f83;
    --m-olive: #d7dc3c;
    --m-divider: rgba(112, 82, 214, 0.45);
    --m-gutter: 20px;
    --m-header-h: 59px;
    --m-subnav-h: 52px;
}

/* Phone-only element: hidden until the phone rules show it. */
.mobile-game-menu { display: none; }


/* ==========================================================================
   992-1199px: header fits on one line (the original nav wraps below 1200px)
   ========================================================================== */
@media only screen and (min-width: 992px) and (max-width: 1199px) {
    .navigation-wrapper .container { padding: 0 16px; }
    .header .Onco-fertility { display: none; }
    .header .nav { flex-wrap: nowrap; }
    .header .nav li a,
    .header.fixed .nav li a { padding: 20px 7px; font-size: 15px; white-space: nowrap; }
    .button-area-inner { gap: 8px; }
    .button-area-inner .normal-btn-border { padding: 6px 12px; }

    /* Send gift keeps only its gift icon. */
    .button-area-inner .sendGiftBtn { font-size: 0; gap: 0; padding: 2px; }
}


/* ==========================================================================
   991px and below: tablets
   ========================================================================== */
@media only screen and (max-width: 991px) {
    /* Logo left; header buttons, purchase toggle and burger right. */
    .header .Onco-fertility { display: none; }
    .navigation-section { gap: 12px; }
    .button-area-wrapper { order: 2; margin-left: auto; }
    .main-nav-outer { order: 3; }
    .button-area-inner { gap: 8px; }
    .button-area-inner .menu-align { padding: 10px 0; }
    .button-area-inner .sendGiftBtn { font-size: 0; gap: 0; padding: 2px; }
    /* Account menu (opened by mobile-ui.js below 992px) drops down from the icon. */
    .button-area-inner #account-menu .nav-dropdown-menu { position: absolute; top: 100%; right: 0; min-width: 180px; opacity: 1; }

    /* Room at the bottom of the open drawer for the header buttons (phones). */
    .main-nav { padding-bottom: 180px; }
}


/* ==========================================================================
   767px and below: phones (Figma "Home - Mobile")
   ========================================================================== */
@media only screen and (max-width: 767px) {

    /* ---------- Header: 59px bar with logo, purchase toggle and burger ---------- */
    .header { min-height: var(--m-header-h); max-height: var(--m-header-h); }
    .content-section { padding-top: var(--m-header-h); }
    .navigation-wrapper .container { padding: 0 0 0 15px; }
    .navigation-section { gap: 0; height: var(--m-header-h); }
    .logo { flex: 1; min-width: 0; min-height: var(--m-header-h); padding: 0; gap: 8px; }
    .header .logo a:first-child img,
    .header.fixed .logo a:first-child img,
    .header .logo .logo-img,
    .header.fixed .logo .logo-img { width: auto; max-width: 197px; height: 26px; }
    .header .logo a:nth-child(2) img,
    .header.fixed .logo a:nth-child(2) img { height: 35px; }
    .bonei-olam { margin: 0; }

    /* Purchase-row toggle: dark square, chevron up while closed, down while open. */
    .slide-icon,
    .slide-icon.active { width: 58px; min-height: var(--m-header-h); padding: 0; justify-content: center; background: var(--m-navy); }
    .slide-icon img { display: none; }
    .slide-icon::before {
        content: ''; width: 10px; height: 10px; margin-top: 6px;
        border: solid var(--white); border-width: 0 2px 2px 0;
        transform: rotate(-135deg); transition: transform 0.2s ease;
    }
    .slide-icon.active::before { margin-top: -6px; transform: rotate(45deg); }
    .menu-icon { display: flex; align-items: center; justify-content: center; width: 54px; height: var(--m-header-h); }
    #nav-icon1 { width: 18px; height: 14px; }

    /* Header buttons are reached from the open burger drawer. */
    .button-area-wrapper { display: none; }
    .navigation-section:has(#nav-icon1.open) .button-area-wrapper {
        display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; margin: 0;
        padding: 20px 30px calc(20px + env(safe-area-inset-bottom));
        background: var(--primary-darkblue); border-top: 1px solid rgba(255, 255, 255, 0.12);
    }
    .navigation-section:has(#nav-icon1.open) .button-area-inner { flex-wrap: wrap; gap: 12px; }
    .navigation-section:has(#nav-icon1.open) .button-area-inner .sendGiftBtn { font-size: 14px; gap: 10px; padding: 2px 2px 2px 12px; }
    /* The account menu opens above the whole bottom bar. */
    .navigation-section:has(#nav-icon1.open) #account-menu { position: static; padding: 0; }
    .navigation-section:has(#nav-icon1.open) #account-menu .nav-dropdown-menu {
        position: absolute; top: auto; right: 30px; bottom: calc(100% + 8px); left: 30px; width: auto; min-width: 0;
        border-radius: 8px; background: var(--m-panel); opacity: 1;
    }

    /* style.css locks scrolling with body.overflow-hide { position: fixed }.
       Without a width the fixed body shrink-wraps to the 130% wheel canvas;
       mobile-ui.js keeps the scroll position while it is locked. */
    body.overflow-hide { left: 0; right: 0; width: 100%; }

    /* Purchase row under the header (Figma "Purchase menu open"). */
    .mob-fix-banner-header { top: var(--m-header-h); background: var(--m-navy); }
    .arrow_links .top-head-inner { height: var(--m-subnav-h); padding: 10px 5px 10px 10px; gap: 4px; justify-content: space-between; align-items: center; }
    .arrow_links .top-inner-text { flex-direction: row; gap: 5px; padding: 4px 6px; border: 0; font-size: 12px; }
    .arrow_links .top-inner-text::after {
        content: ''; width: 5px; height: 5px; margin-top: -3px;
        border: solid var(--white); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
    }
    .arrow_links .inner-content { display: contents; }
    .arrow_links .inner-prize-content,
    .arrow_links .sendGiftBtn { display: none; }
    .arrow_links .yellow-btn { padding: 4px 5px 4px 12px; font-size: 10px; white-space: nowrap; }

    /* Dreidel-face legend: not in the phone design, and it overlapped page
       content outside the game. style.css forces it on with !important. */
    .mob-prize-section { display: none !important; }
    /* Outside the game (account page) the open row would cover the page title. */
    body:has(.slide-icon.active) :not(.mgm-layout) > .on-mobile-wrap { height: var(--m-subnav-h); }

    /* ---------- Home game: wheel, control strip, menu bars and their panels ---------- */
    .mgm-layout .container-fluid { padding: 0; }
    /* The open purchase row would hide the wheel pointer: push the game down. */
    body:has(.slide-icon.active) .mgm-layout { padding-top: calc(var(--m-header-h) + var(--m-subnav-h)); }

    /* The game wrappers are flattened so the wheel, controls, bars and the
       panels each bar opens form one column, in the Figma order. */
    .mgm-layout .banner-inner { display: flex; flex-direction: column; height: auto; }
    .mgm-layout .panel-wrapper,
    .mgm-layout .bottom-panel,
    .mgm-layout .inner-container,
    .mgm-layout .right-panel,
    .mgm-layout .raffle-inner-wrapper,
    .mgm-layout .mobile-game-menu { display: contents; }
    .mgm-layout .middle-panel { order: 1; width: 100%; border-radius: 0; }
    .mgm-layout .player-view-wrapper { order: 2; }
    .mgm-layout .play-content-wrapper { order: 3; }
    .mgm-layout .mgm-result { order: 4; }
    .mgm-layout .play-game-wrapper { order: 5; }
    .mgm-layout .mgm-info { order: 6; }
    .mgm-layout .left-panel { order: 7; }
    .mgm-layout .mgm-mega { order: 8; }
    .mgm-layout .mega-raffle-wrapper { order: 9; }
    .mgm-layout .mgm-day { order: 10; }
    .mgm-layout .prize-day-box { order: 11; }
    .mgm-layout .mgm-winners { order: 12; }
    .mgm-layout .recent-win-wrapper { order: 13; }
    .mgm-layout .recent-winner-view { order: 14; }

    /* Wheel: a 332px full-width window. The canvas takes its size from
       .object-3d-section, so that box is drawn 1.3x larger (same aspect) and
       cropped, bottom-aligned, to match the Figma framing (arch running off
       both sides, pointer just under the header). The window keeps the
       Figma proportion up to 420px high. */
    .mgm-layout { --m-wheel-h: min(88.5vw, 420px); } /* 332px at 375px, as in Figma */
    .mgm-layout .middle-panel { height: var(--m-wheel-h); overflow: hidden; }
    .mgm-layout .middle-panel::before,
    .mgm-layout .object-3d-section canvas { border-radius: 0; }
    .mgm-layout .object-3d-section { width: 130%; height: calc(var(--m-wheel-h) * 1.3); margin: calc(var(--m-wheel-h) * -0.3) -15% 0; }

    /* Control strip (Figma "Play single player" / "Play mutli player"). */
    .mgm-layout .play-content-wrapper {
        min-height: 0; padding: 15px 10px; border: 0; border-radius: 0; box-shadow: none;
        background: radial-gradient(60% 120% at 50% 0%, rgba(112, 82, 214, 0.25) 0%, rgba(33, 29, 59, 0) 100%), var(--m-panel);
    }
    .mgm-layout .play-content-wrapper::before { display: none; }
    .mgm-layout .play-content-inner { align-items: center; justify-content: space-between; gap: 0; }
    .mgm-layout .spins-available-wrapper { display: contents; }

    .mgm-layout .mp-mode-switch-inline { order: 1; flex: 0 0 auto; flex-direction: row; gap: 5px; padding: 0 0 0 5px; border: 0; }
    .mgm-layout .mp-mode-btn { width: 34px; height: 36px; aspect-ratio: auto; padding: 4px 4px 4px 5px; }
    .mgm-layout .mp-mode-btn svg { width: 14px; height: 14px; }

    .mgm-layout .play-sound { order: 2; flex: 0 0 auto; }
    .mgm-layout .play-sound .spin-title,
    .mgm-layout .sound-btn { display: none; }
    .mgm-layout .switch-wrapper { padding: 0; }
    .mgm-layout .switch-btn-wrapper { position: static; display: flex; width: auto; height: auto; }
    /* Sound: pink pill with On/Off and a white speaker knob (Figma "volume on/off"). */
    .mgm-layout .switch-btn {
        position: relative; display: flex; align-items: center; gap: 5px;
        width: 46px; max-width: none; height: 21px; padding: 3px 4px 3px 7px;
        border-radius: 18px; background: var(--primary-red); opacity: 1;
    }
    .mgm-layout .switch-label { display: none; float: none; font-size: 10px; line-height: 13px; opacity: 1; }
    .mgm-layout .switch-input:checked ~ .switch-btn .switch-label-on,
    .mgm-layout .switch-input:not(:checked) ~ .switch-btn .switch-label-off { display: block; }
    /* Below 768px the game script writes the current state into .mobile-sound. */
    .mgm-layout .switch-btn:has(.mobile-sound) .switch-label:not(.mobile-sound) { display: none; }
    .mgm-layout .switch-input ~ .switch-btn .switch-label.mobile-sound { display: block; opacity: 1; }
    .mgm-layout .switch-selection {
        position: static; display: flex; align-items: center; justify-content: center;
        flex: 0 0 15px; width: 15px; max-width: none; transform: none;
    }
    .mgm-layout .switch-selection::before { content: '\f6a9'; font-family: 'Font Awesome 6 Pro'; font-weight: 400; font-size: 8px; color: #000; }
    .mgm-layout .switch-input:checked ~ .switch-btn .switch-selection { transform: none; }
    .mgm-layout .switch-input:checked ~ .switch-btn .switch-selection::before { content: '\f6a8'; }

    .mgm-layout .available-top- { order: 3; flex: 0 0 auto; padding: 0 15px; border-inline: 1px solid var(--m-divider); }
    .mgm-layout .available-top- .spin-title { font-size: 8px; }
    .mgm-layout .available-top- .spin-count { margin: 0; font-size: 22px; line-height: 27px; }

    .mgm-layout .play-spinner { order: 4; position: static; flex: 0 0 105px; width: 105px; transform: none; }
    /* Single mode (Figma "Play single player", 67px): the 37px row sets the
       height and the 85px Spin rises out of it, over the bottom of the wheel. */
    .mgm-layout .bottom-panel:not(.mp-active) .play-content-wrapper { position: relative; z-index: 2; }
    .mgm-layout .bottom-panel:not(.mp-active) .play-spinner { height: 37px; align-items: flex-end; overflow: visible; }
    .mgm-layout .bottom-panel:not(.mp-active) .play-spinner #startit { margin-bottom: -5px; }
    .mgm-layout .play-content-inner { max-width: 520px; margin: 0 auto; }
    .mgm-layout .spin-wrapper { min-width: 85px; max-width: 85px; }
    .mgm-layout .inner-spin-block { min-width: 82px; max-width: 82px; }
    .mgm-layout .spin-wrapper .center .circle:nth-child(1) { width: 72px; height: 72px; }
    .mgm-layout .inner-animation { width: 58px; height: 58px; }
    .mgm-layout .spin-wrapper .center .text-content { width: 62px; height: 62px; }
    .mgm-layout .spin-wrapper .center .text-content span { font-size: 27px; }

    /* Multi-player game (Figma "Play mutli player", 117px): a players row,
       then the controls row with Multi/Single; Spin spans both rows. */
    .mgm-layout .player-view-wrapper {
        width: 100%; max-width: none; padding: 15px 115px 0 10px;
        border: 0; border-radius: 0; box-shadow: none; background: var(--m-panel);
    }
    .mgm-layout .player-view-wrapper .play-content-inner { align-items: center; gap: 8px; }
    .mgm-layout .player-view-wrapper .mp-mode-switch { order: 2; flex: 0 0 auto; flex-direction: row; padding: 0; margin: 0; border: 0; }
    .mgm-layout .player-view-wrapper .mp-mode-btn:not([data-mode="viewall"]) { display: none; }
    .mgm-layout .mp-players-panel { order: 1; flex: 1; min-width: 0; gap: 0; }
    .mgm-layout .mp-players-carousel { align-items: center; gap: 4px; }
    .mgm-layout .mp-carousel-btn { flex: 0 0 20px; }
    /* One player at a time, as in Figma: each chip is exactly the viewport width. */
    .mgm-layout .mp-carousel-viewport { flex: 0 0 var(--m-chip-w, 140px); }
    .mgm-layout .mp-players-panel { flex-wrap: wrap; row-gap: 6px; }
    .mgm-layout .mp-players-carousel { flex: 1 1 100%; }
    /* A single visible chip needs no edge fade (the arrows show what is left). */
    .mgm-layout .mp-carousel-viewport.has-more-left,
    .mgm-layout .mp-carousel-viewport.has-more-right { -webkit-mask-image: none; mask-image: none; }
    .mgm-layout .mp-configure-players { order: 3; flex-basis: 100%; font-size: 10px; }
    .mgm-layout .mp-players-track { gap: 0; align-items: center; }
    .mgm-layout .mp-players-track .mp-player-chip,
    .mgm-layout .mp-players-track .mp-player-chip.is-playing {
        flex: 0 0 var(--m-chip-w, 140px); flex-direction: row; align-items: center; justify-content: center; gap: 6px;
        width: var(--m-chip-w, 140px); min-width: 0; max-width: none;
    }
    .mgm-layout .mp-chip-avatar { width: 35px; height: 35px; min-width: 35px; border-width: 1px; font-size: 13px; }
    .mgm-layout .mp-spin-badge { right: -6px; bottom: -6px; min-width: 20px; height: 20px; font-family: 'DunbarTall-Bold'; font-size: 8px; }
    .mgm-layout .mp-chip-name { flex: 0 1 auto; min-width: 0; max-width: 48px; margin: 0; font-family: 'DunbarTall-Regular'; font-size: 8px; }
    .mgm-layout .mp-chip-tags { flex: 0 0 auto; }
    .mgm-layout .mp-tag { width: 45px; height: 30px; padding: 2px 5px; border-radius: 30px; font-size: 8px; line-height: 1.15; text-align: center; }
    .mgm-layout .bottom-panel.mp-active .mp-mode-switch-inline { display: flex; }
    .mgm-layout .bottom-panel.mp-active .play-content-wrapper { position: relative; padding: 15px 115px 15px 10px; overflow: visible; background: var(--m-panel); }
    .mgm-layout .bottom-panel.mp-active .play-content-wrapper .play-content-inner { max-width: none; }
    /* Players row (15 + 35) + controls row (15 + 37 + 15) = 117px; Spin (85px)
       is centred on that, i.e. 8.5px into the controls row. */
    .mgm-layout .bottom-panel.mp-active .play-spinner {
        position: absolute; top: calc(8.5px - 85px / 2); right: 10px; z-index: 2;
        display: flex; align-items: center; width: 85px; height: 85px; flex: none;
    }

    /* Menu bars (Figma "... closed"). */
    .mgm-bar {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        width: 100%; min-height: 43px; margin: 0; padding: 0 15px;
        border: 0; border-bottom: 1px solid var(--m-purple); border-radius: 0;
        background: var(--m-navy); color: var(--white); text-align: left;
        font-family: 'DunbarTall-Regular'; font-size: 14px; line-height: 18px; cursor: pointer;
    }
    .mgm-bar:focus-visible { outline: 2px solid var(--primary-yellow); outline-offset: -2px; }
    .mgm-bar::after {
        content: ''; flex: 0 0 auto; width: 10px; height: 10px; margin-right: 8px;
        border: solid var(--white); border-width: 0 2px 2px 0;
        transform: rotate(-45deg); transition: transform 0.2s ease;
    }
    .mgm-bar[aria-expanded="true"]::after { transform: rotate(45deg); }
    .mgm-bar[hidden] { display: none; }
    .mgm-result-value { font-family: 'DunbarTall-Bold'; color: var(--primary-yellow); }

    /* Panels (Figma "... open"): closed until their bar opens them. */
    .mgm-layout .play-game-wrapper:not(.mgm-open),
    .mgm-layout .left-panel:not(.mgm-open),
    .mgm-layout .mega-raffle-wrapper:not(.mgm-open),
    .mgm-layout .prize-day-box:not(.mgm-open),
    .mgm-layout .recent-win-wrapper:not(.mgm-open) { display: none; }
    .mgm-layout .left-panel.mgm-open,
    .mgm-layout .mega-raffle-wrapper.mgm-open,
    .mgm-layout .prize-day-box.mgm-open,
    .mgm-layout .recent-win-wrapper.mgm-open { display: block; }
    .mgm-layout .left-panel,
    .mgm-layout .mega-raffle-wrapper,
    .mgm-layout .prize-day-box,
    .mgm-layout .recent-win-wrapper {
        position: static; width: 100%; max-width: none; min-width: 0; height: auto; margin: 0;
        border: 0; border-radius: 0; box-shadow: none;
    }
    /* The Recent winners bar replaces the older phone-only list below the game. */
    .mgm-layout + .recent-mobile-block { display: none; }

    /* On phones mobile-ui.js moves each panel right after its bar
       (reading/tab order) and marks it .mgm-panel; these restore the rules
       style.css gives them through their desktop parents. */
    .mgm-layout .mgm-panel .yellow-btn span { min-width: 26px; height: 26px; padding: 4px 7px; font-size: 14px; }
    .mgm-layout .mgm-panel .card-content { position: relative; }

    /* Result. */
    .mgm-layout .play-game-wrapper { padding: 15px; border: 0; border-radius: 0; background: var(--m-panel); box-shadow: none; }
    .mgm-layout .play-game-wrapper::before { display: none; }
    .mgm-layout .dreidel-info-inner .dreidel-list { align-items: center; gap: 15px; }
    .mgm-layout .dreidel-info-inner .rules-content-area { display: flex; flex-direction: row; align-items: center; gap: 10px; text-align: left; }
    .mgm-layout .dreidel-info-inner .rules-icon { flex: 0 0 46px; text-align: center; }
    .mgm-layout .dreidel-info-inner .text-info { margin: 0; text-align: left; font-size: 12px; }

    /* During and after a spin (Figma "Results bar open"): Prize and Dreidel
       side by side, Final result in a pink row below. Each step label is an
       inline pill instead of the desktop's absolutely placed progress steps. */
    .mgm-layout .results-info-inner { padding: 0; gap: 0; }
    .mgm-layout .results-box-wrapper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; }
    .mgm-layout .results-box-inner,
    .mgm-layout .results-box-inner:nth-child(1),
    .mgm-layout .results-box-inner:nth-child(3) {
        display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px;
        width: auto; min-width: 0; min-height: 65px; padding: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.06);
    }
    .mgm-layout .results-box-inner.result-box { grid-column: 1 / -1; flex-direction: row; align-items: center; background: var(--primary-red); }
    .mgm-layout .results-box-inner .inner-step { position: static; flex: 0 0 auto; width: auto; }
    .mgm-layout .results-box-inner .inner-step::before,
    .mgm-layout .results-box-inner .inner-step::after,
    .mgm-layout .results-box-inner .step-bar-line { display: none; }
    .mgm-layout .results-box-inner .step-item {
        position: static; width: auto; min-width: 0; height: 28px; padding: 3px 10px 3px 3px; gap: 5px;
        border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 26px; background: var(--m-panel);
    }
    .mgm-layout .results-box-inner .icon-box { width: 20px; height: 20px; max-width: 20px; border-width: 1px; font-size: 10px; }
    .mgm-layout .results-box-inner .step-title {
        position: static; width: auto; margin: 0; transform: none;
        font-family: 'DunbarTall-Regular'; font-size: 10px; line-height: 12px; color: var(--white); white-space: nowrap;
    }
    .mgm-layout .results-box-inner .results-inner-deatils { align-self: stretch; justify-content: center; min-width: 0; }
    .mgm-layout .results-box-inner .results-inner-content,
    .mgm-layout .results-box-inner:nth-child(3) .results-inner-content { padding: 0; }
    .mgm-layout .results-box-inner .empty-line { margin: 0; font-size: 10px; text-align: center; }
    .mgm-layout .prize-box .results-inner-content { display: flex; align-items: center; gap: 8px; }
    .mgm-layout .prize-box .text-info,
    .mgm-layout .dreidel-box .text-info { margin: 0; font-size: 10px; line-height: 12px; text-align: left; }
    .mgm-layout .dreidel-box .dreidel-list { flex-direction: row; align-items: center; gap: 8px; padding: 0; }
    .mgm-layout .dreidel-box .dreidel-list-inner img { width: 45px; }
    .mgm-layout .dreidel-box .rules-content-area { gap: 2px; }
    .mgm-layout .result-box .results-inner-deatils { flex: 1; }
    .mgm-layout .result-box .final-result-wrapper { justify-content: center; gap: 10px; }
    .mgm-layout .result-box .final-img-wrap .image-wrap { width: 45px; height: 45px; }
    .mgm-layout .result-box .final-img-wrap .results-price + .image-wrap { width: 47px; height: 34px; }
    .mgm-layout .result-box .add-plus { padding: 0; font-family: 'DunbarTall-Ultra'; font-size: 12px; color: var(--white); }
    .mgm-layout .result-box .no-prize { color: var(--white); font-size: 12px; text-align: center; }

    /* Game info (desktop left panel). */
    .mgm-layout .left-panel { padding: 20px; background: var(--m-purple); }
    .mgm-layout .left-panel::after { display: none; }
    .mgm-layout .play-information { align-items: center; gap: 30px; padding: 0; }
    /* style.css gives the desktop column fixed heights that depend on the game
       mode (.mp-active, .open-banner), up to (0,4,0) specificity; the id makes
       these panels always take their content height. */
    #Dreidel.mgm-layout .play-information,
    #Dreidel.mgm-layout .recent-win-wrapper .winner-list-section { height: auto; max-height: none; overflow-y: visible; }
    .mgm-layout .spin-logo img { max-width: 111px; }
    .mgm-layout .description-section,
    .mgm-layout .about-us-sections { width: 100%; }
    .mgm-layout .bullet-listing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
    .mgm-layout .bullet-listing h1 { grid-column: 1 / -1; margin-bottom: 10px; font-family: 'DunbarTall-Regular'; font-size: 14px; }
    .mgm-layout .bullet-listing li { flex-direction: column; gap: 8px; margin: 0; text-align: center; font-family: 'DunbarTall-Regular'; font-size: 12px; }
    .mgm-layout .bullet-listing li:not(:last-child) { margin-bottom: 0; }
    .mgm-layout .bullet-listing li::before { width: 40px; height: 40px; min-width: 40px; font-family: 'DunbarTall-Regular'; font-size: 21px; }
    .mgm-layout .full-instruction-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
    .mgm-layout .full-instruction-btn .normal-btn-border { min-height: 35px; margin: 0; padding: 6px 6px 6px 12px; gap: 5px; font-family: 'DunbarTall-Regular'; font-size: 14px; white-space: nowrap; }
    .mgm-layout .full-instruction-btn .normal-btn-border > i:first-child { font-size: 14px; }
    .mgm-layout .about-us-sections p { font-family: 'DunbarTall-Regular'; font-size: 12px; }
    .mgm-layout .about-us-sections a { font-family: 'DunbarTall-Regular'; font-size: 11px; }
    .mgm-layout .about-us-inner { display: block; }
    .mgm-layout .left-panel .desc { margin-bottom: 0; }
    .mgm-layout .left-btn-wrapper { display: flex; justify-content: center; margin-top: 30px; padding: 0; }
    .mgm-layout .left-btn-wrapper .yellow-btn { width: 210px; min-height: 30px; padding: 6px 6px 6px 12px; font-family: 'DunbarTall-Regular'; font-size: 14px; }

    /* Mega raffle. */
    .mgm-layout .mega-raffle-wrapper { padding: 30px 20px; background: var(--m-raffle); }
    .mgm-layout .mega-raffle-wrapper .total-entries span { font-size: 12px; }
    .mgm-layout .mega-raffle-wrapper .total-entries b { font-size: 14px; }
    .mgm-layout .mega-raffle-wrapper .timers { gap: 8px; justify-content: center; }
    .mgm-layout .mega-raffle-wrapper .timer { flex: 0 1 75px; height: 73px; padding: 12px 9px; }
    .mgm-layout .mega-raffle-wrapper .timer > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
    .mgm-layout .mega-raffle-wrapper .timer span { font-size: 24px; }
    .mgm-layout .mega-raffle-wrapper .timer b { font-family: 'DunbarTall-Regular'; font-size: 12px; }
    .mgm-layout .mega-raffle-wrapper .winner-name { max-width: none; font-size: 13px; }
    .mgm-layout .mega-raffle-wrapper .winner-section { display: flex; flex-direction: column; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--m-divider); }
    .mgm-layout .mega-raffle-wrapper .winner-section .yellow-btn { width: auto; margin: 12px auto 0; font-family: 'DunbarTall-Regular'; font-size: 14px; }

    /* Prize of the Day. */
    .mgm-layout .prize-day-box { padding: 20px; }
    .mgm-layout .prize-day-box .single-head-wrapper { justify-content: center; gap: 5px; }
    .mgm-layout .prize-day-box .prize-content-inner { justify-content: center; gap: 15px; }
    .mgm-layout .prize-day-box .img-content img { --width: 160px; width: 160px; height: 160px; max-height: none; aspect-ratio: 1; object-fit: cover; border-radius: 5px; }
    .mgm-layout .prize-day-box .img-content { flex: 0 0 160px; width: 160px; }
    .mgm-layout .prize-day-box .single-card-head { font-size: 18px; }
    .mgm-layout .prize-day-box .day-num p { padding: 4px 10px; font-size: 14px; }
    .mgm-layout .prize-day-box .prize-details .normal-btn-border { min-height: 35px; font-family: 'DunbarTall-Regular'; font-size: 12px; }
    .mgm-layout .prize-day-box .prize-details { width: 160px; gap: 20px; }
    .mgm-layout .prize-day-box .prize-content-area > p { text-align: center; }

    /* Recent winners: one horizontal row. */
    .mgm-layout .recent-win-wrapper { min-height: 0; padding: 20px 0; background: var(--m-purple); }
    .mgm-layout .recent-win-wrapper .single-head-wrapper { justify-content: flex-start; gap: 10px; padding: 0 15px; }
    .mgm-layout .recent-win-wrapper .single-card-head { font-size: 18px; }
    .mgm-layout .recent-win-wrapper .winner-list-section {
        display: flex; gap: 8px; height: auto; margin-top: 12px; padding: 10px 15px;
        overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    }
    .mgm-layout .recent-win-wrapper .winner-list-section::before,
    .mgm-layout .recent-win-wrapper .winner-list-section::after { display: none; }
    .mgm-layout .recent-win-wrapper .winner-list { flex: 0 0 auto; margin: 0; padding: 0 8px 0 0; border-right: 1px solid var(--m-divider); }
    .mgm-layout .recent-win-wrapper .winner-list:last-child { border-right: 0; }
    .mgm-layout .recent-win-wrapper .winner-detail { flex-direction: column; align-items: flex-start; gap: 0; }
    .mgm-layout .recent-win-wrapper .winner-detail h3 { font-family: 'DunbarTall-Regular'; font-size: 8px; line-height: 10px; white-space: nowrap; }
    .mgm-layout .recent-win-wrapper .gift-price { font-size: 10px; line-height: 13px; text-align: left; white-space: nowrap; }

    #Prizes { scroll-margin-top: var(--m-header-h); }

    /* ---------- Popups ---------- */
    /* style.css makes phone popups full screen; keep them exactly one screen
       high and scroll inside (some were shorter, some 8px taller). */
    .popup-wrapper:not(.today-daily-pop),
    .banner-wrapper { height: 100dvh; overflow-y: auto; }
    /* Purchase / gift / raffle wizards: steps in a row on top, form full width
       (the desktop 177px steps column left a ~110px form at 375px). */
    .amount-pop-wrap .inner-body-wrapper { grid-template-columns: minmax(0, 1fr); }
    .amount-pop-wrap .wizard > .steps {
        grid-row: auto; width: auto; max-width: none; margin: 0 20px 15px; padding: 0 0 15px;
        border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    .amount-pop-wrap .popup-body-inner .wizard .steps ul { flex-direction: row; justify-content: space-between; gap: 8px; }
    .amount-pop-wrap .popup-body-inner .wizard .steps ul > li { flex: 1 1 0; min-width: 0; }
    .amount-pop-wrap .popup-body-inner .wizard .steps a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; line-height: 1.2; text-align: center; white-space: normal; }
    .amount-pop-wrap .wizard > .steps .animation-img { display: none; }
    .amount-pop-wrap .inner-body-wrapper .content { grid-column: auto; padding-left: 20px; }

    /* ---------- Prize of the Day section: dark full-width band ---------- */
    .available-prizes-wrapper:has(.todays-prize) { padding-top: 0; }
    .available-inner-block > .section-title:first-child,
    .available-inner-block > .todays-prize { margin: 0 -10px; background: var(--m-navy); }
    .available-inner-block > .section-title:first-child { padding: 20px var(--m-gutter) 0; }
    .available-inner-block > .todays-prize { padding: 20px var(--m-gutter); }
    .available-inner-block .todays-prize .today-prize-inner { background: transparent; }
    .available-inner-block .todays-prize .today-prize-area { padding: 0; }
    .available-inner-block .todays-prize .convert-img { border-radius: 14px; }
    .available-inner-block .todays-prize .today-footer { padding: 20px 0 0; }
    .available-inner-block .todays-prize .today-price { width: 100%; min-height: 70px; border-radius: 14px; }
    .available-inner-block .time-left-num { width: auto; max-width: none; min-width: 119px; min-height: 30px; padding: 4px 12px; gap: 8px; }
    .recent-today-wrapper { margin-top: 0; }
    .today-list { flex: 0 0 150px; width: 150px; min-height: 221px; border-radius: 10px; }

    /* ---------- Recent winners band: Figma cards (name, prize, time), 177x215.
       Card + side margins stay 194px, the slot the marquee width is built on. ---------- */
    .recent-box {
        display: flex; flex-direction: column; align-items: center; gap: 9px;
        width: 177px; height: 215px; margin: 0 8.5px; padding: 22px 3px 0; border-radius: 6px;
    }
    .recent-box .recent-detail { display: contents; }
    .recent-box .recent-name { order: 1; font-size: 18px; line-height: 20px; }
    .recent-box .recent-list-img { order: 2; padding: 0; }
    .recent-box .recent-list-image { width: 95px; height: 95px; border-radius: 6px; }
    .recent-box .update-view { order: 3; font-size: 12px; line-height: 14px; color: var(--white); }
    .recent-winners-wrapper .section-title { padding: 0 10px; }

    /* ---------- Available prizes ---------- */
    .avail-subtext { gap: 20px; }

    /* ---------- About ---------- */
    #video-sec .paragraph-text h3 { font-family: 'DunbarTall-Regular'; color: var(--m-olive); }

    /* ---------- Contact ---------- */
    #contact { padding: 35px 15px; }
    #contact > .container { padding: 0; }
    .info-detail a { align-items: center; min-height: 105px; }
    .info-detail .detail-contet { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
    .info-detail a strong { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin: 0; }

    /* ---------- Footer ---------- */
    .footer { padding: 20px 0 30px; }
    .footer > .container { padding: 0 var(--m-gutter); }
    .footer-content-wrap { align-items: flex-start; gap: 30px; }
    .footer-logo img:first-child { height: 27px; }
    .footer-logo .bonei-olam { height: 31px; }
    .footer-content-wrap ul li,
    .footer-content-wrap ul li a { font-family: 'DunbarTall-Medium', 'DunbarTall-Regular'; font-size: 16px; }
    .footer-content-wrap ul li i { margin-right: 6px; color: var(--primary-yellow); }
}


/* ==========================================================================
   374px and below: narrow phones
   ========================================================================== */
@media only screen and (max-width: 374px) {
    .header .logo a:first-child img,
    .header.fixed .logo a:first-child img,
    .header .logo .logo-img,
    .header.fixed .logo .logo-img { height: 21px; }
    .header .logo a:nth-child(2) img,
    .header.fixed .logo a:nth-child(2) img { height: 30px; }
    .slide-icon,
    .slide-icon.active { width: 50px; }
    .menu-icon { width: 46px; }

    .arrow_links .top-inner-text { padding: 4px 3px; font-size: 11px; }
    .arrow_links .yellow-btn { padding-left: 8px; }

    .mgm-layout .play-content-wrapper { padding: 12px 6px; }
    .mgm-layout .mp-mode-switch-inline { gap: 3px; padding: 0; }
    .mgm-layout .available-top- { padding: 0 8px; }
    .mgm-layout .play-spinner { flex-basis: 90px; width: 90px; }
    .mgm-layout .full-instruction-btn { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .mgm-layout .full-instruction-btn .normal-btn-border { padding-left: 8px; font-size: 12px; }
    .mgm-layout .player-view-wrapper,
    .mgm-layout .bottom-panel.mp-active .play-content-wrapper { padding-right: 100px; }
    .mgm-layout { --m-chip-w: 118px; }
    .mgm-layout .mp-chip-name { max-width: 30px; }
    .mgm-layout .mp-tag { width: 40px; }

    /* Keep two prize columns (style.css drops to one below 352px). */
    .prizes-listing-wrapper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .prize-list-img { padding: 14px 10px 8px; }
    .prize-list-img .results-price { font-size: 28px; -webkit-text-stroke-width: 1.2px; }
    .prize-title { padding: 10px; }
}
