/*
  CMS and map pages module.
  Extracted from the former modules/20-home-news-profile.css; keep after 21-profile-legacy-ui.css.
*/

/* === CMS Page Content === */
.cmsPage{
  line-height:1.65;
  word-break:break-word;
}
.cmsPage > *:first-child{ margin-top:0; }
.cmsPage > *:last-child{ margin-bottom:0; }

.cmsPage img{
  max-width:100%;
  height:auto;
  display:block;
  border-radius:12px;
}

.cmsPage figure{
  margin:16px 0;
}
.cmsPage figure > :first-child{
  margin-top:0;
}
.cmsPage figure > :last-child{
  margin-bottom:0;
}
.cmsPage figcaption{
  margin-top:8px;
  color: rgba(231,237,243,.72);
  font-size: 13px;
  line-height: 1.5;
  text-align:center;
}
.cmsPage picture{
  display:block;
}
.cmsPage video,
.cmsPage audio{
  display:block;
  width:100%;
  max-width:100%;
  margin:14px 0;
  border-radius:14px;
  background: rgba(0,0,0,.28);
}
.cmsPage iframe{
  display:block;
  width:100%;
  max-width:100%;
  border:0;
  border-radius:14px;
  background: rgba(0,0,0,.28);
}

.cmsPage table{
  width:100%;
  margin:14px 0;
  display:block;
  overflow:auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(0,0,0,.14);
}
.cmsPage table{ border-collapse: separate; border-spacing:0; }
.cmsPage th,.cmsPage td{
  padding:9px 11px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space:nowrap;
}
.cmsPage tr:last-child td{ border-bottom:0; }
.cmsPage th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(0,0,0,.24);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
  opacity: .85;
}
.cmsPage tr:hover td{ background: rgba(255,255,255,.03); }

.cmsPage pre{
  overflow:auto;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(0,0,0,0.28);
}
.cmsPage code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
}

.cmsPage .cmsEmbedWrap{
  position:relative;
  width:100%;
  padding-top:56.25%;
  margin:14px 0;
  border-radius:14px;
  overflow:hidden;
  background:rgba(0,0,0,0.28);
}
.cmsPage .cmsEmbedWrap .cmsEmbed{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

/* === RustMaps embed === */
.mapEmbed{
  width:100%;
  aspect-ratio: 16 / 9;
  border:1px solid var(--border);
  border-radius: 14px;
  overflow:hidden;
  background: rgba(0,0,0,0.25);
}
.mapEmbed iframe,
.mapEmbed img{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

/* === Map page: give RustMaps more room === */
html.page-map .wrap{
  width: 100%;
  max-width: none;
}

html.page-map .grid{
  grid-template-columns: 1fr 360px;
}
@media (max-width: 980px){
  html.page-map .grid{ grid-template-columns: 1fr; }
}

/* Taller map on map page (16:9 often feels too small inside the 1250px wrap) */
html.page-map .mapEmbed{
  aspect-ratio: auto;
  height: var(--map-h, 72vh);
  min-height: 640px;
}

/* Wide mode: hide sidebar and expand */
html.page-map.map-wide .grid{ grid-template-columns: 1fr; }
html.page-map.map-wide .grid > aside{ display:none !important; }
html.page-map.map-wide .mapEmbed{
  height: var(--map-h-wide, 82vh);
  min-height: 740px;
}


/*
  Market page layout
  ------------------
  Р В Р В°Р Р…РЎРЉРЎв‚¬Р Вµ Р СРЎвЂ№ РЎвЂћР С‘Р С”РЎРѓР С‘РЎР‚Р С•Р Р†Р В°Р В»Р С‘ Р Р†РЎвЂ№РЎРѓР С•РЎвЂљРЎС“ РЎРѓРЎвЂљРЎР‚Р В°Р Р…Р С‘РЎвЂ РЎвЂ№ (100vh) Р С‘ Р Р†Р С”Р В»РЎР‹РЎвЂЎР В°Р В»Р С‘ Р Р†Р Р…РЎС“РЎвЂљРЎР‚Р ВµР Р…Р Р…Р С‘Р в„– РЎРѓР С”РЎР‚Р С•Р В»Р В» Р Р† #marketApp,
  РЎвЂЎРЎвЂљР С•Р В±РЎвЂ№ "РЎв‚¬Р В°Р С—Р С”Р В°/РЎРѓР В°Р в„–Р Т‘Р В±Р В°РЎР‚" Р В±РЎвЂ№Р В»Р С‘ РЎРѓРЎвЂљР В°РЎвЂљР С‘РЎвЂЎР Р…РЎвЂ№Р СР С‘. Р СњР В° Р С—РЎР‚Р В°Р С”РЎвЂљР С‘Р С”Р Вµ Р Р…Р В° РЎР‚Р В°Р В·Р Р…РЎвЂ№РЎвЂ¦ РЎРЊР С”РЎР‚Р В°Р Р…Р В°РЎвЂ¦ РЎРЊРЎвЂљР С• Р Р†РЎвЂ№Р С–Р В»РЎРЏР Т‘Р С‘РЎвЂљ Р С”Р В°Р С”
  "РЎРѓР В¶Р В°РЎвЂљР В°РЎРЏ" РЎРѓРЎвЂљРЎР‚Р В°Р Р…Р С‘РЎвЂ Р В° (Р С”Р С•Р Р…РЎвЂљР ВµР Р…РЎвЂљ Р В¶Р С‘Р Р†РЎвЂРЎвЂљ Р Р† Р СР В°Р В»Р ВµР Р…РЎРЉР С”Р С•Р С Р С•Р С”Р Р…Р Вµ РЎРѓР С• РЎРѓР С”РЎР‚Р С•Р В»Р В»Р С•Р С Р Р†Р Р…РЎС“РЎвЂљРЎР‚Р С‘).

  Р СњР С•Р Р†Р С•Р Вµ Р С—Р С•Р Р†Р ВµР Т‘Р ВµР Р…Р С‘Р Вµ: Р С•Р В±РЎвЂ№РЎвЂЎР Р…РЎвЂ№Р в„– РЎРѓР С”РЎР‚Р С•Р В»Р В» РЎРѓРЎвЂљРЎР‚Р В°Р Р…Р С‘РЎвЂ РЎвЂ№ (body), Р В±Р ВµР В· 100vh-Р С•Р С–РЎР‚Р В°Р Р…Р С‘РЎвЂЎР ВµР Р…Р С‘Р в„–.
*/
html.page-market,
html.page-market body{
  height: auto;
  overflow: auto;
}

html.page-market .wrap{
  /* Use a wider clamp than default pages, but keep the layout centered.
     IMPORTANT: Market page should not reserve an empty right column (monitoring). */
  margin: var(--page-gap-top) auto var(--page-gap-bottom);
  padding: 0 var(--page-pad-x);
  max-width: 1760px;
  height: auto;
}

/* Market: do not reserve sidebar column on wide screens (prevents big empty area on the right) */
html.page-market .grid{ grid-template-columns: 1fr; }

html.page-market .shopsPage{
  height: auto;
  display:block;
}

html.page-market #marketApp{
  overflow: visible;
  padding-right: 0;
}

/* Avoid double padding: .panel-body already provides inner spacing */
html.page-market #marketApp.shopsApp{ padding: 0; }


