/* Block Blast Online v6.10.7 — shared UI normalization.
 * This file is intentionally small and semantic: it fills component gaps that
 * are shared across runtime bundles instead of appending page-specific patches.
 */

/* Game chrome: the dedicated Full button owns fullscreen exit, so the topbar
 * now contains only settings controls and aligns them consistently. */
.arcade-topbar{justify-content:flex-end}
.arcade-controls{margin-left:auto}

/* Localized homepage components. The English homepage already had equivalent
 * components, but localized-home.php used different class names without styles. */
.content-card{background:#fff;border:1px solid var(--line,#d6e6f8);border-radius:22px;padding:clamp(22px,4vw,36px);box-shadow:0 12px 34px rgba(31,82,153,.07)}
.content-card--wide{width:100%;min-width:0}
.home-seo-overview .content-card>p:not(.eyebrow),.content-card>p:not(.eyebrow){color:var(--muted,#60759a);line-height:1.75}
.home-feature-grid,.quick-step-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:24px}
.home-feature-grid article,.quick-step-grid article{min-width:0;border:1px solid var(--line,#d6e6f8);border-radius:17px;padding:20px;background:linear-gradient(180deg,#fff,#f8fbff)}
.home-feature-grid h3,.quick-step-grid h3{margin:0 0 8px;font-size:clamp(1.05rem,2vw,1.25rem)}
.home-feature-grid p,.quick-step-grid p{margin:0;color:var(--muted,#60759a);line-height:1.62}
.quick-step-grid article>span{display:grid;place-items:center;width:34px;height:34px;margin-bottom:13px;border-radius:10px;background:#e8f4ff;color:var(--brand,#168fe7);font-size:.78rem;font-weight:900;letter-spacing:.04em}
.home-side-panel--steps{align-self:stretch}

/* Homepage traffic/tool section: 7 cards now form a deliberate 4 + 3 layout
 * on desktop instead of leaving one orphan card on a third row. */
.home-section--traffic-tools .traffic-tool-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
.home-section--traffic-tools .traffic-tool-card{grid-column:span 3;min-height:100%;display:flex;flex-direction:column}
.home-section--traffic-tools .traffic-tool-card:nth-child(n+5){grid-column:span 4}
.home-section--traffic-tools .traffic-tool-card>strong{margin-top:auto;padding-top:10px}

/* Traffic / retention surfaces: align card geometry and avoid table/filter
 * overflow from newer v6.5–v6.10 pages. */
.traffic-main,.leaderboard-main,.practice-main,.data-main,.season-page,.shape-database-main{min-width:0;overflow-x:clip}
.traffic-main .shell,.leaderboard-main .shell,.practice-main .shell,.data-main .shell,.season-page .shell{min-width:0}
.traffic-card,.analyzer-editor-card,.analyzer-results-card,.daily-today-card,.daily-history-card,.leaderboard-card,.practice-game-card,.practice-coach-card{min-width:0}
.leaderboard-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.leaderboard-table th,.leaderboard-table td{vertical-align:middle}
.leaderboard-toolbar select,.leaderboard-toolbar input,.shape-db-toolbar input{max-width:100%}
.player-badge-card,.player-season-card{background:linear-gradient(180deg,#fff,#f8fbff)}
.player-badge-card{border-color:#e6d9a6}
.player-season-card{border-color:#cfe4f8}
.season-page .season-switch .button{white-space:nowrap}
.shape-database-main .guide-article{min-width:0}

/* Localized Solver: localized-solver.php uses a more descriptive wrapper than
 * the English template; these rules give it the same finished control surface. */
.solver-piece-library-wrap{margin-top:16px;padding:14px;border:1px solid var(--line,#d6e6f8);border-radius:16px;background:#f8fbff}
.solver-piece-library-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:10px}
.solver-piece-library-head strong{font-size:.92rem;color:var(--text,#122b59)}
.solver-piece-library-head span{color:var(--muted,#60759a);font-size:.78rem;line-height:1.4;text-align:right}
.solver-strategy-field{display:grid;grid-template-columns:minmax(120px,.55fr) minmax(180px,1fr);gap:12px;align-items:center;margin-top:16px;padding:14px;border:1px solid var(--line,#d6e6f8);border-radius:14px;background:#fff}
.solver-strategy-field label{font-size:.84rem;font-weight:800;color:var(--text,#122b59)}
.solver-strategy-field select{width:100%;min-height:44px;border:1px solid #cbd9e8;border-radius:11px;padding:8px 34px 8px 11px;background:#fff;color:var(--text,#122b59)}

/* Generic page polish for focus/hover consistency on recently added tools. */
.traffic-tool-card,.guide-link-card,.post-card,.content-card,.traffic-card{transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.traffic-tool-card:focus-visible,.guide-link-card:focus-visible{outline:3px solid rgba(22,143,231,.28);outline-offset:3px}
@media (hover:hover){.traffic-card:hover,.content-card:hover{border-color:#c9dced}}

@media(max-width:1020px){
  .home-section--traffic-tools .traffic-tool-card,.home-section--traffic-tools .traffic-tool-card:nth-child(n+5){grid-column:span 6}
}
@media(max-width:760px){
  .home-feature-grid,.quick-step-grid{grid-template-columns:1fr}
  .content-card{padding:20px;border-radius:18px}
  .solver-piece-library-head{display:block}
  .solver-piece-library-head span{display:block;margin-top:3px;text-align:left}
  .solver-strategy-field{grid-template-columns:1fr}
}
@media(max-width:620px){
  .home-section--traffic-tools .traffic-tool-card,.home-section--traffic-tools .traffic-tool-card:nth-child(n+5){grid-column:1/-1}
  .home-section--traffic-tools .traffic-tool-grid{gap:12px}
  .leaderboard-toolbar{max-width:100%}
  .leaderboard-toolbar>*{min-width:0}
}
@media(prefers-reduced-motion:reduce){.traffic-tool-card,.guide-link-card,.post-card,.content-card,.traffic-card{transition:none}}
.arcade-power-button--restart .arcade-power-button__disc{color:#7047de}


/* Game-over dialog polish: simplify the action hierarchy and make the
 * leaderboard save card visually belong to the dialog instead of looking like
 * an unrelated white box dropped into it. */
.game-dialog__panel{max-width:min(100%,430px)}
.game-dialog__panel #bbo-final-meta{margin-top:4px;font-size:13px;line-height:1.4;opacity:.96}
.game-dialog__stats{margin-top:16px}
.game-dialog__stats>div{display:flex;flex-direction:column;justify-content:center;min-height:70px}
.game-leaderboard-submit{margin:16px 0 4px;padding:14px 14px 12px;border:1px solid rgba(255,255,255,.24);border-radius:16px;background:rgba(244,248,255,.9);box-shadow:inset 0 1px 0 rgba(255,255,255,.55);text-align:left}
.game-leaderboard-submit__head{display:grid;gap:5px;margin-bottom:10px}
.game-leaderboard-submit__head strong{font-size:1rem;line-height:1.2;color:#17376f}
.game-leaderboard-submit__head span{font-size:.83rem;line-height:1.45;color:#49658c}
.game-leaderboard-submit__form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.game-leaderboard-submit label{min-width:0}
.game-leaderboard-submit label span{display:block;margin-bottom:5px;font-size:.73rem;font-weight:800;letter-spacing:.02em;color:#1c3c74}
.game-leaderboard-submit input{width:100%;min-height:44px;border:1px solid #bfd0e7;border-radius:12px;padding:10px 12px;background:#fff;color:#17376f;box-shadow:inset 0 1px 0 rgba(255,255,255,.75)}
.game-leaderboard-submit input::placeholder{color:#7f92aa}
.game-leaderboard-submit #bbo-leaderboard-save{min-height:44px;padding-inline:18px;border-radius:12px;white-space:nowrap}
.game-leaderboard-submit__links{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:10px}
.game-leaderboard-submit__links a{font-size:.82rem;font-weight:800;color:#145fca;text-decoration:none}
.game-leaderboard-submit__links a:hover{text-decoration:underline}
.game-leaderboard-submit small{display:block;min-height:1.3em;margin-top:9px;color:#34537e;font-size:.77rem;line-height:1.4}
.game-dialog__actions--share{grid-template-columns:1fr 1fr;gap:9px;align-items:stretch}
.game-dialog__actions--share #bbo-play-again{grid-column:1/-1;order:1;min-height:54px;font-size:17px}
.game-dialog__actions--share #bbo-share-result{order:2}
.game-dialog__actions--share #bbo-challenge-friend{order:3}
.game-dialog__actions--share #bbo-share-card{grid-column:1/-1;order:4;min-height:40px;border-radius:12px;background:rgba(29,58,132,.28);box-shadow:none;border-color:rgba(255,255,255,.18);font-size:13px}
.game-dialog__actions--share .button--subtle:hover{background:rgba(29,58,132,.38)}
.share-feedback{margin:10px 4px 0;min-height:1.3em;font-size:.82rem;line-height:1.45;color:#edf4ff}
@media(max-width:620px){
  .game-leaderboard-submit{padding:13px 12px 11px;border-radius:15px}
  .game-leaderboard-submit__form{grid-template-columns:1fr}
  .game-leaderboard-submit #bbo-leaderboard-save{width:100%}
  .game-dialog__actions--share{grid-template-columns:1fr 1fr;gap:8px}
}
@media(max-width:460px){
  .game-dialog__panel{padding:20px 14px 15px}
  .game-dialog__panel h2{margin-inline:28px;font-size:30px}
  .game-dialog__score-wrap .game-dialog__score{font-size:52px}
  .game-dialog__stats>div{min-height:64px}
  .game-dialog__actions--share{grid-template-columns:1fr}
  .game-dialog__actions--share > *{grid-column:1!important}
}


/* v6.10.7 — Language selector lives in the footer instead of competing with
 * the primary header/navigation. It keeps the current route on locale changes. */
.site-footer__language{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:18px;padding:16px 18px;border:1px solid rgba(148,168,191,.16);border-radius:15px;background:rgba(14,29,49,.48)}
.site-footer__language-copy{display:flex;align-items:baseline;gap:10px;min-width:0}
.site-footer__language-kicker{color:#8298b3;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.site-footer__language-copy strong{color:#e7f0fa;font-size:14px;font-weight:800}
.site-footer__language .language-switcher{margin:0;display:flex;align-items:center;min-width:0}
.site-footer__language .language-switcher__field{position:relative;display:block;min-width:210px}
.site-footer__language .language-switcher select{appearance:none;-webkit-appearance:none;width:100%;max-width:none;min-height:42px;padding:9px 40px 9px 13px;border:1px solid #36506f;border-radius:10px;background:#10243e;color:#f0f6fc;font-size:13px;font-weight:750;line-height:1.2;cursor:pointer}
.site-footer__language .language-switcher select:hover{border-color:#55799e;background:#142b49}
.site-footer__language .language-switcher select:focus-visible{outline:3px solid rgba(80,155,230,.22);outline-offset:2px;border-color:#5b8abd;background:#142b49}
.site-footer__language .language-switcher__chevron{position:absolute;right:15px;top:50%;width:8px;height:8px;margin-top:-6px;border-right:2px solid #8eaccb;border-bottom:2px solid #8eaccb;transform:rotate(45deg);pointer-events:none}
.bbo-rtl .site-footer__language .language-switcher select{padding-right:13px;padding-left:40px}
.bbo-rtl .site-footer__language .language-switcher__chevron{right:auto;left:15px}
@media(max-width:760px){
  .site-footer__language{align-items:stretch;flex-direction:column;gap:10px;padding:15px;margin-top:14px}
  .site-footer__language-copy{justify-content:space-between;gap:14px}
  .site-footer__language .language-switcher{width:100%;margin:0}
  .site-footer__language .language-switcher__field{width:100%;min-width:0}
  .site-footer__language .language-switcher select{width:100%;max-width:none;min-height:44px;font-size:13px}
}
@media(max-width:420px){
  .site-footer__language{padding:13px;border-radius:13px}
  .site-footer__language-copy strong{font-size:13px}
}


/* v6.10.7 — Footer redesign. The previous footer looked too narrow on desktop,
 * with brand/links floating in the center and a weak relationship between
 * language, note and copyright. Bring the footer back onto the same container
 * rhythm as the rest of the site and improve hierarchy. */
.site-footer{margin-top:54px;border-top:1px solid #1e3550;background:linear-gradient(180deg,#081525 0%,#0b1a2d 100%);color:#fff}
.site-footer .shell{width:min(calc(100% - 32px),var(--shell));margin-inline:auto}
.site-footer__main{display:grid;grid-template-columns:minmax(260px,330px) minmax(0,1fr);gap:52px;align-items:start;padding:34px 0 26px}
.site-footer__brand-block{max-width:none;padding-right:6px}
.footer-brand{display:inline-flex;align-items:center;gap:12px;color:#fff;font-size:28px;font-weight:850;line-height:1.1;text-decoration:none}
.footer-brand__mark{display:grid;grid-template-columns:repeat(2,8px);grid-template-rows:repeat(2,8px);gap:2px;padding:6px;border:1px solid #355478;border-radius:8px;background:#10233b;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.footer-brand__mark i{display:block;width:8px;height:8px;border-radius:2px}
.site-footer__tagline{max-width:32rem;margin:14px 0 0;color:#a8bad1!important;font-size:15px;line-height:1.7}
.site-footer__links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 34px;align-items:start}
.footer-group{min-width:0}
.footer-group h2{margin:0 0 13px;color:#eef5fc;font-size:12px;font-weight:850;letter-spacing:.1em;text-transform:uppercase}
.footer-group ul{display:grid;gap:9px;margin:0;padding:0;list-style:none}
.footer-group li{margin:0}
.footer-group a{display:inline-block;color:#b6c7d8;font-size:14px;font-weight:650;line-height:1.45;text-decoration:none}
.footer-group a:hover,.footer-group a:focus-visible{color:#fff;text-decoration:none}
.site-footer__language{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px;margin-top:0;padding:18px 20px;border-top:1px solid #1d3249;border-bottom:1px solid #1d3249;background:rgba(10,22,38,.35)}
.site-footer__language-copy{display:grid;gap:4px;align-items:start}
.site-footer__language-kicker{color:#87a0bc;font-size:11px;font-weight:850;letter-spacing:.09em;text-transform:uppercase}
.site-footer__language-copy strong{color:#f1f7ff;font-size:16px;font-weight:800;line-height:1.2}
.site-footer__language-copy p{margin:0;max-width:44rem;color:#9eb2cb;font-size:13px;line-height:1.55}
.site-footer__language .language-switcher{display:flex;align-items:center;gap:10px;margin:0}
.site-footer__language .language-switcher__field{min-width:250px}
.site-footer__language .language-switcher select{min-height:44px;padding:10px 42px 10px 14px;border:1px solid #355171;border-radius:12px;background:#10243e;color:#f0f6fc;font-size:14px;font-weight:750}
.site-footer__language .language-switcher__submit{display:none}
.site-footer__note{padding:14px 0 12px;border:0;background:transparent}
.site-footer__note p{max-width:none;margin:0;color:#7f95af!important;font-size:12.5px;line-height:1.55}
.site-footer__bottom{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0;padding:15px 0 max(18px,env(safe-area-inset-bottom));border-top:1px solid #1d3249;color:#91a6bf;font-size:12.5px}
.site-footer__copyright{white-space:nowrap}
.site-footer__legal{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap}
.site-footer__legal a{color:#b9cae0;text-decoration:none}
.site-footer__legal a:hover,.site-footer__legal a:focus-visible{color:#fff}
@media (max-width: 980px){
  .site-footer__main{grid-template-columns:1fr;gap:28px;padding-top:30px}
  .site-footer__brand-block{max-width:none}
  .site-footer__links{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 22px}
  .site-footer__language{grid-template-columns:1fr;align-items:start}
}
@media (max-width: 760px){
  .site-footer{margin-top:38px}
  .site-footer .shell{width:calc(100% - 24px)}
  .site-footer__main{gap:22px;padding:26px 0 20px}
  .footer-brand{font-size:24px}
  .site-footer__tagline{font-size:14px;line-height:1.6}
  .site-footer__links{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 18px}
  .footer-group{padding:0;border:0;display:block}
  .footer-group h2{margin-bottom:10px}
  .footer-group ul{display:grid;gap:8px}
  .footer-group li:not(:last-child)::after{content:none!important}
  .footer-group a{font-size:13px;white-space:normal}
  .site-footer__language{padding:16px 0 15px;background:transparent}
  .site-footer__language .language-switcher{width:100%}
  .site-footer__language .language-switcher__field{width:100%;min-width:0}
  .site-footer__language .language-switcher select{width:100%}
  .site-footer__bottom{flex-direction:column;align-items:flex-start;gap:8px}
  .site-footer__legal{justify-content:flex-start}
}
@media (max-width: 460px){
  .site-footer__links{grid-template-columns:1fr}
  .footer-brand{font-size:21px}
  .site-footer__tagline{font-size:13px}
  .site-footer__language-copy strong{font-size:14px}
  .site-footer__language-copy p{font-size:12px}
  .site-footer__note p,.site-footer__bottom{font-size:12px}
}
