/* Shared RU / AZ / TR identity. Red canvas, white resting surfaces, gold controls. */
html:root[lang]{--baazar-red:#ec1729;--baazar-ink:#202126;--baazar-gold:#c99a2e;background:#ec1729}
html:root[lang] body.baazar-theme{background:#ec1729!important;color:#fff!important;--navy:#202126;--purple:#b9192a;--green:#b9192a;--gold:#c99a2e;--lime:#fff;--muted:#555963;--line:#e7dfd3}
html:root[lang] body.baazar-theme :is(header,.page,.entry-page,.entry-copy,.hero,.vr-root,.vr-hero,.vr-hero-copy,.vr-seller){background:#ec1729!important;color:#fff!important;box-shadow:none!important}
html:root[lang] body.baazar-theme header{border-bottom:3px solid #fff!important}
html:root[lang] body.baazar-theme header :is(.brand,.brandlight,.brand small){color:#fff!important}
html:root[lang] body.baazar-theme :is(.brand-logo,.footer-logo){background:transparent!important;box-shadow:none!important;filter:none!important}
html:root[lang] body.baazar-theme :is(.panel,.empty,.stat,.card,dialog,.filters,.search-attributes,.catalog-extra,.tr-search-panel,.venue,.source,.install-strip,.vr-store-demo,.ss-panel){background:#fff!important;color:#202126!important;border:1px solid #e7dfd3!important;border-radius:18px;box-shadow:0 5px 20px #65071314!important}
html:root[lang] body.baazar-theme :is(.panel,.empty,.stat,.card,dialog,.filters,.venue,.source,.install-strip,.search-attributes,.catalog-extra,.tr-search-panel,.vr-store-demo) :is(h1,h2,h3,p,label,.meta,.muted,summary,small,.eyebrow){color:#202126!important}
html:root[lang] body.baazar-theme :is(.hero,.entry-copy) :is(h1,h2,p,.eyebrow,em,.entry-note,.guided-caption,.type-label){color:#fff!important}
html:root[lang] body.baazar-theme :is(.page-title,.page>.eyebrow,.section-head,.loading){color:#fff!important}
html:root[lang] body.baazar-theme :is(#main,header,footer,dialog,.mobile-nav,.page-shortcuts,.admin-portal-bar) :is(button,.primary,.vr-button,.text-button),html:root[lang] body.baazar-theme .tr-country-in-city{background:#fff!important;color:#171717!important;border:3px solid #c99a2e!important;border-radius:12px;box-shadow:0 2px 0 #8c641b22!important;font-weight:750}
html:root[lang] body.baazar-theme :is(#main,header,footer,dialog,.mobile-nav,.page-shortcuts) button:hover{background:#fff8e6!important;border-color:#a87916!important;color:#171717!important}
html:root[lang] body.baazar-theme :is(#main,header,footer,dialog,.mobile-nav) :is(button.active,button[aria-pressed=true]){background:#ffedbd!important;color:#171717!important;border-color:#986b15!important}
html:root[lang] body.baazar-theme :is(input,select,textarea){background:#fff!important;color:#202126!important;border:2px solid #b9b5ae!important;border-radius:10px}
html:root[lang] body.baazar-theme :is(input[type=checkbox],input[type=radio]){accent-color:#bd1021}
html:root[lang] body.baazar-theme :is(summary,.tr-sellers span){background:#fff!important;color:#202126!important;border-color:#c99a2e!important}
html:root[lang] body.baazar-theme .tr-sellers input:checked+span{background:#ffedbd!important;color:#171717!important}
html:root[lang] body.baazar-theme :is(footer,.mobile-nav){background:#fff!important;color:#202126!important;border-top:3px solid #c99a2e!important}
html:root[lang] body.baazar-theme footer :is(.footer-brand,.brandlight,p,span){color:#202126!important}
html:root[lang] body.baazar-theme .vr-editorial{background:#ec1729!important}
html:root[lang] body.baazar-theme :is(.vr-editorial-copy,.vr-community>div){background:#fff!important;color:#202126!important;border-radius:22px;padding:clamp(24px,4vw,58px)}
html:root[lang] body.baazar-theme :is(.vr-editorial-copy,.vr-community>div) :is(h2,p,.vr-kicker,span){color:#202126!important}
html:root[lang] body.baazar-theme .vr-community{background:#ec1729!important;color:#fff!important}
html:root[lang] body.baazar-theme .vr-card{background:#fff!important;color:#202126!important;border-radius:18px;overflow:hidden}
html:root[lang] body.baazar-theme .vr-card :is(h3,p,.vr-caption){color:#202126!important}
html:root[lang] body.baazar-theme .hero{border:0!important;padding-bottom:24px}
html:root[lang] body.baazar-theme .entry-page{border:0!important}
html:root[lang] body.baazar-theme .searchbar{border-color:#c99a2e!important;background:#fff!important;color:#202126!important}
html:root[lang] body.baazar-theme .searchbar .search-icon{color:#b9192a!important}
html:root[lang] body.baazar-theme .source :is(h2,p,.source-icon,.arrow){color:#202126!important}
html:root[lang] body.baazar-theme .entry-copy :is(button,.primary){color:#171717!important}
html:root[lang] body.baazar-theme :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #152b4c!important;outline-offset:3px}
html:root[lang] body.baazar-theme .vr-category-card span,html:root[lang] body.baazar-theme .vr-wide-card span,html:root[lang] body.baazar-theme .vr-mosaic span{color:#fff!important}
html:root[lang] body.baazar-theme #toast{background:#fff!important;color:#202126!important;border:2px solid #c99a2e!important}
@media(max-width:700px){html:root[lang] body.baazar-theme :is(.vr-editorial-copy,.vr-community>div){border-radius:18px;padding:24px 20px}html:root[lang] body.baazar-theme .search-attributes{padding:12px}}

/* Compact public masthead: retain each locale's existing logo dimensions. */
html:root[lang] body.baazar-theme header.compact-public-header{
 --header-inset:4.5%;position:relative;display:grid!important;
 grid-template-columns:var(--header-logo-width,180px) minmax(0,1fr)!important;
 grid-template-rows:1fr 1fr;align-items:center!important;gap:0 20px!important;
 padding:12px var(--header-inset)!important;border-bottom:0!important;
}
html:root[lang] body.baazar-theme header.compact-public-header::after{content:'';position:absolute;bottom:0;left:calc(var(--header-inset) + var(--header-logo-width,180px) + 16px);right:0;height:3px;background:#fff;pointer-events:none}
html:root[lang] body.baazar-theme header.compact-public-header .brand{display:contents!important}
html:root[lang] body.baazar-theme header.compact-public-header .brand-logo{grid-column:1;grid-row:1/3;align-self:center}
html:root[lang] body.baazar-theme header.compact-public-header .brand>span{grid-column:2;grid-row:1;align-self:end;margin-bottom:12px;text-align:left}
html:root[lang] body.baazar-theme header.compact-public-header .region-row{grid-column:2;grid-row:2;align-self:start;display:flex!important;flex-wrap:nowrap!important;width:100%!important;min-width:0;gap:7px!important;margin:0!important;padding:0 0 10px!important;overflow-x:auto;align-items:center;justify-content:flex-start!important;scrollbar-width:thin}
html:root[lang] body.baazar-theme header.compact-public-header nav{display:flex!important;flex-wrap:nowrap!important;flex:0 0 auto!important;width:auto!important;margin:0!important;gap:7px!important;position:static!important}
html:root[lang] body.baazar-theme header.compact-public-header .language-switch{margin:0!important;flex:0 0 auto;order:3}
html:root[lang] body.baazar-theme header.compact-public-header .page-shortcuts{padding:0!important;margin:0!important;flex-wrap:nowrap!important;flex:0 0 auto;gap:7px!important}
html:root[lang] body.baazar-theme header.compact-public-header :is(button,#account-button,.region){font-size:15px!important;line-height:1.2!important;padding:9px 11px!important;min-height:42px!important;max-width:none!important;white-space:nowrap!important;flex:0 0 auto!important;margin:0!important}
html:root[lang] body.baazar-theme header.compact-public-header .country-picker{font-size:11px}
html:root[lang] body.baazar-theme header.compact-public-header .country-picker select{min-height:42px;padding:8px;font-size:15px}
@media(max-width:700px){html:root[lang] body.baazar-theme header.compact-public-header{--header-inset:16px;gap:0 12px!important}html:root[lang] body.baazar-theme header.compact-public-header .brand>span{font-size:20px!important;overflow-wrap:anywhere}html:root[lang] body.baazar-theme header.compact-public-header .brand small{display:none!important}}
/* Smaller masthead logo and high-contrast compact category captions. */
html:root[lang] body.baazar-theme header.compact-public-header .brand-logo{width:58px!important;height:58px!important}
html:root[lang] body.baazar-theme:has(.home-page) header.compact-public-header .brand-logo{width:90px!important;height:90px!important}
html:root[lang] body.baazar-theme.guest header.compact-public-header .brand-logo{width:42px!important;height:42px!important}
html:root[lang=tr] body.baazar-theme header.compact-public-header .brand-logo{width:130px!important;height:130px!important}
html:root[lang] body.baazar-theme header.compact-public-header{grid-template-rows:auto auto;padding-top:8px!important;padding-bottom:8px!important}
html:root[lang] body.baazar-theme header.compact-public-header .brand>span{margin-bottom:8px}
html:root[lang] body.baazar-theme #main .vr-category-card{height:194px!important;padding:0!important;background:#fff!important}
html:root[lang] body.baazar-theme #main .vr-category-card>span{min-height:50px;padding:6px 9px!important;margin:0;display:flex!important;justify-content:center;flex-direction:column;background:#fff!important;color:#171717!important;line-height:1.15}
html:root[lang] body.baazar-theme #main .vr-category-card>span :is(strong,small){color:#171717!important;text-shadow:none!important}
html:root[lang] body.baazar-theme #main .vr-category-card strong{font-size:18px!important;line-height:1.15!important}
@media(max-width:700px){html:root[lang] body.baazar-theme header.compact-public-header .brand-logo{width:52px!important;height:52px!important}html:root[lang] body.baazar-theme:has(.home-page) header.compact-public-header .brand-logo{width:76px!important;height:76px!important}html:root[lang] body.baazar-theme.guest header.compact-public-header .brand-logo{width:27px!important;height:27px!important}html:root[lang=tr] body.baazar-theme header.compact-public-header .brand-logo{width:96px!important;height:96px!important}}
html:root[lang=tr] body.baazar-theme:is(.guest,.tr-theme,.vr-active) header.compact-public-header .brand-logo{width:130px!important;height:130px!important}
@media(max-width:700px){html:root[lang=tr] body.baazar-theme:is(.guest,.tr-theme,.vr-active) header.compact-public-header .brand-logo{width:96px!important;height:96px!important}}
html:root[lang] body.baazar-theme .ru-name-search{display:grid;gap:8px;margin:18px 0}
html:root[lang] body.baazar-theme .ru-name-search>div{display:flex;gap:8px}.ru-name-search input{flex:1;min-width:0;padding:14px;background:white;color:#171717;border:2px solid #c99a2e;border-radius:12px}
.ru-source-options{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.ru-selected-venue{padding:12px;background:#fff;color:#171717;border-radius:12px}#venue-choices{max-height:55vh;overflow-y:auto}#venue-choices button{display:flex;flex-direction:column;text-align:left;align-items:flex-start;gap:6px;width:100%}
html:root[lang=tr] body.baazar-theme #main .vr-category-search{display:flex;align-items:center;border:2px solid #c99a2e;border-radius:999px;background:#fff;overflow:hidden;padding:3px}
html:root[lang=tr] body.baazar-theme #main .vr-category-search input{border:0!important;box-shadow:none!important;background:transparent!important;border-radius:999px;min-width:0;padding:12px 20px}
html:root[lang=tr] body.baazar-theme #main .vr-category-search button{display:grid;place-items:center;flex:0 0 54px;width:54px;height:54px;padding:4px!important;min-height:54px;border:0!important;border-radius:50%!important;background:#ffedbd!important;font-size:36px!important;line-height:1;color:#171717!important;box-shadow:none!important}
html:root[lang] body.admin-portal #admin-login-fields{max-width:520px}html:root[lang] body.admin-portal #admin-login-fields form{padding:0;margin:0}html:root[lang] body.admin-portal #admin-login-fields label{margin:12px 0}
/* Content remains visible even if the scroll reveal observer is interrupted. */
html:root[lang=tr] body.baazar-theme .vr-reveal.vr-observed:not(.vr-visible){opacity:1;transform:none}
html.app-starting body>header,html.app-starting body>footer,html.app-starting .page-shortcuts{visibility:hidden}
html.app-starting body{background:#f7f7f7!important}
#startup-status{position:fixed;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#f7f7f7;color:#202126;z-index:9999;font:18px Arial,sans-serif;gap:12px}#startup-status strong{font-size:30px;color:#ec1729}#startup-status button{padding:12px 20px}
html.admin-starting body>header,html.admin-starting body>footer,html.admin-starting .page-shortcuts{display:none!important}
html:root[lang] body.baazar-theme dialog:has(#venue-choices){width:min(620px,calc(100vw - 24px));height:min(650px,85dvh);max-height:85dvh;padding:22px!important;overflow:hidden!important}
html:root[lang] body.baazar-theme dialog:has(#venue-choices) #modal-content{height:100%;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:12px;overflow:hidden}
html:root[lang] body.baazar-theme dialog:has(#venue-choices) :is(.modal-brand,.modal-home){display:none!important}
html:root[lang] body.baazar-theme dialog:has(#venue-choices) h2{font-size:23px!important;line-height:1.2;margin:0;padding-right:44px}
html:root[lang] body.baazar-theme dialog:has(#venue-choices) #venue-query{width:100%;min-width:0;font-size:17px;padding:10px;min-height:44px}
html:root[lang] body.baazar-theme #venue-choices{min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;margin:0;padding-right:6px}
html:root[lang] body.baazar-theme dialog:has(#venue-choices)>button{position:absolute;top:8px;right:8px;width:36px;height:36px;min-height:36px!important;padding:3px!important;font-size:24px!important;z-index:2}
html:has(dialog[open]),body:has(dialog[open]){overflow:hidden}
html:root[lang] body.baazar-theme #venue-choices{display:flex!important;flex-direction:column;justify-content:flex-start;gap:8px}
html:root[lang] body.baazar-theme #venue-choices>button{flex:0 0 auto;min-height:72px;height:auto;justify-content:center!important;padding:12px!important;font-size:17px!important}

/* The selected place is a filter, independent of async result chips. */
html:root[lang] body.baazar-theme #main .venue-filter{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#fff!important;color:#202126!important;border:2px solid #c99a2e;border-radius:14px;padding:14px 16px;margin:14px 0}
html:root[lang] body.baazar-theme #main .venue-filter :is(small,strong,span,button){color:#202126!important;-webkit-text-fill-color:#202126!important}
.venue-filter>div:first-child{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}.venue-filter strong{font-size:21px}.venue-filter small{font-size:14px}.venue-filter-actions{display:flex;gap:8px;flex-wrap:wrap}.venue-filter button{min-height:44px}
dialog:has(#venue-choices){box-sizing:border-box}dialog:has(#venue-choices) #modal-content{box-sizing:border-box}#venue-choices button[aria-pressed=true]{border:2px solid #c99a2e!important;background:#fff5d7!important}
@media(max-width:600px){.venue-filter-actions{width:100%}.venue-filter-actions button{flex:1}}
html:root[lang] body.baazar-theme .ru-name-search{min-width:0;grid-template-columns:minmax(0,1fr)}
html:root[lang] body.baazar-theme .ru-name-search>div{min-width:0}
@media(max-width:600px){html:root[lang] body.baazar-theme .ru-name-search>div{flex-direction:column}html:root[lang] body.baazar-theme .ru-name-search input{width:100%;box-sizing:border-box}html:root[lang] body.baazar-theme .ru-name-search label{white-space:normal;overflow-wrap:anywhere}}

/* Entry logo doubled, 2026-09-30. */
html:root[lang] body.baazar-theme.guest header.compact-public-header .brand-logo{width:84px!important;height:84px!important}
html:root[lang=tr] body.baazar-theme.guest header.compact-public-header .brand-logo{width:260px!important;height:260px!important}
@media(max-width:700px){
 html:root[lang] body.baazar-theme.guest header.compact-public-header .brand-logo{width:54px!important;height:54px!important}
 html:root[lang=tr] body.baazar-theme.guest header.compact-public-header .brand-logo{width:192px!important;height:192px!important;grid-column:1;grid-row:1}
 html:root[lang=tr] body.baazar-theme.guest header.compact-public-header{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto;row-gap:10px!important}
 html:root[lang=tr] body.baazar-theme.guest header.compact-public-header .brand>span{grid-column:1;grid-row:2}
 html:root[lang=tr] body.baazar-theme.guest header.compact-public-header .region-row{grid-column:1;grid-row:3}
 html:root[lang=tr] body.baazar-theme.guest header.compact-public-header::after{left:var(--header-inset)}
}

/* Mobile public navigation: keep all controls inside the viewport. */
@media(max-width:700px){
 html:root[lang] body.baazar-theme header.compact-public-header .region-row{grid-column:1/-1;flex-wrap:wrap!important;overflow-x:visible}
 html:root[lang] body.baazar-theme header.compact-public-header nav{flex-wrap:wrap!important;flex:1 1 100%!important;max-width:100%}
 html:root[lang] body.baazar-theme header.compact-public-header .brand-logo{grid-row:1}
 html:root[lang] body.baazar-theme header.compact-public-header :is(button,#account-button,.region){white-space:normal!important;max-width:100%!important}
 html:root[lang] body.baazar-theme header.compact-public-header .brand>span{min-width:0;white-space:normal;overflow-wrap:anywhere}
}

/* Route controls must remain readable inside venue and product cards. */
html:root[lang] body.baazar-theme .route-actions a.route-action,
html:root[lang] body.baazar-theme .route-actions a.route-action:visited{color:#173a64!important;-webkit-text-fill-color:#173a64!important;background:#fff!important;opacity:1}
html:root[lang] body.baazar-theme .route-actions a.route-action:hover{color:#102b4b!important;-webkit-text-fill-color:#102b4b!important;background:#edf3fa!important}
html:root[lang] body.baazar-theme .route-actions a.route-action:focus-visible{outline:3px solid #173a64!important;outline-offset:3px}

/* Align repeated cards by content rows, without clipping long names or addresses. */
html:root[lang] body.baazar-theme .venue-grid{align-items:stretch}
html:root[lang] body.baazar-theme .venue-grid>.venue{display:flex;flex-direction:column;align-items:stretch;text-align:start;gap:12px;min-width:0}
html:root[lang] body.baazar-theme .venue-grid>.venue>:is(h3,p){margin:0!important;overflow-wrap:break-word}
html:root[lang] body.baazar-theme .venue-grid>.venue>.route-actions{margin-top:auto!important;padding-top:8px}
@supports(grid-template-rows:subgrid){html:root[lang] body.baazar-theme .venue-grid>.venue{display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:14px}html:root[lang] body.baazar-theme .venue-grid>.venue>.route-actions{align-self:end}}
html:root[lang] body.baazar-theme .route-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;align-items:stretch;width:100%;min-width:0}
html:root[lang] body.baazar-theme .route-actions a.route-action{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;min-width:0;min-height:48px;margin:0!important;padding:10px 8px!important;font-size:16px!important;line-height:1.35!important;font-weight:650;white-space:normal;word-break:normal;overflow-wrap:normal}
html:root[lang] body.baazar-theme .route-actions a.route-action:last-child:nth-child(3){grid-column:1/-1}
html:root[lang] body.baazar-theme .card{display:flex;flex-direction:column;min-width:0}
html:root[lang] body.baazar-theme .card>.card-body{display:flex;flex-direction:column;flex:1;min-width:0}
html:root[lang] body.baazar-theme .card-body>.card-actions{margin-top:auto;padding-top:12px}
html:root[lang] body.baazar-theme .card-body>:is(h3,p){text-align:start;overflow-wrap:break-word}

/* Mobile typography: wrap prose at word boundaries, keep text columns usable. */
@media (max-width: 700px) {
  html:root[lang] body.baazar-theme,
  html:root[lang] body.baazar-theme :is(h1,h2,h3,h4,p,a,button,label,summary,span,strong,small,li,figcaption) {
    -webkit-hyphens: none !important;
    hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
  html:root[lang] body.baazar-theme :is(.entry-copy,.promo-copy,.card-body,.venue,.form label) { min-width: 0; }
  html:root[lang] body.baazar-theme :is(.entry-actions,.account-actions,.card-actions) { min-width: 0; }
  html:root[lang] body.baazar-theme :is(.entry-actions,.account-actions,.card-actions) button {
    max-width: 100%;
    white-space: normal;
  }
  /* A fixed-width video must never squeeze the adjacent copy to a few letters. */
  html:root[lang] body.baazar-theme .promo-slot {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  html:root[lang] body.baazar-theme .promo-slot .promo-copy {
    flex: 0 0 auto !important;
    width: 100%;
  }
  html:root[lang] body.baazar-theme .promo-slot .brand-video {
    align-self: center;
    margin: 12px auto 0 !important;
  }
  html:root[lang] body.baazar-theme .promo-slot .promo-copy h3 {
    margin-right: 28px !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
  }
  html:root[lang] body.baazar-theme .promo-slot .promo-copy > small { padding-right: 28px; }
  html:root[lang] body.baazar-theme .category-ribbon-card {
    width: 190px !important;
    flex-basis: 190px !important;
  }
  html:root[lang] body.baazar-theme .category-ribbon-label strong { font-size: 18px; }
  /* Technical strings have no word boundaries; contain them within their own fields. */
  html:root[lang] body.baazar-theme :is(code,.contract-hash,.invitation-link) {
    overflow-wrap: anywhere !important;
  }
}
@media (max-width: 480px) {
  html:root[lang] body.baazar-theme :is(.venue-grid,.products,.tariff-grid,.login-options) {
    grid-template-columns: minmax(0,1fr) !important;
  }
  html:root[lang] body.baazar-theme .route-actions {
    grid-template-columns: minmax(0,1fr) !important;
  }
  html:root[lang] body.baazar-theme .route-actions a.route-action:last-child { grid-column: auto; }
}
