/* t783 v3: default = standard maroon module header + clear tabs.
   Previews: ?ftabv=1|2|3. No More/arrow overrides — use site-wide pm-more / hm-more. */

/* Center: 3-up only when >=660px; else wrap at min 200px. Does not change --c-page-max. */
html .dx-pos[data-pos="center"]{
  container-type:inline-size;
  container-name:hmcenter;
}
html .dx-pos[data-pos="center"].dx-pos-horizontal{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  gap:8px;
  align-items:stretch; /* t804: was flex-start; columns share the row height */
}
html .dx-pos[data-pos="center"].dx-pos-horizontal>.hm-tabsmod-wrap{
  flex:1 1 200px;
  min-width:200px;
  max-width:calc(50% - 4px);
  margin:0;
  box-sizing:border-box;
}
@container hmcenter (min-width:660px){
  .dx-pos[data-pos="center"].dx-pos-horizontal{flex-wrap:nowrap}
  .dx-pos[data-pos="center"].dx-pos-horizontal>.hm-tabsmod-wrap{
    flex:1 1 0%;
    min-width:0;
    max-width:none;
  }
}

html .j10-mod.hm-tabsmod-wrap{
  margin:0;
  display:flex;
  flex-direction:column;
  min-width:0;
  background:#fff;
}
html .hm-tabsmod-wrap .hm-tabsmod{
  margin:0;
  display:flex;
  flex-direction:column;
  min-width:0;
  flex:1 1 auto;
}

/* Default: same header chrome as .j10-mod h3, title left, tabs right. */
html .hm-tabsmod-wrap .hm-tabs-h{
  display:flex;
  align-items:stretch;
  gap:0;
  margin:0;
  padding:0;
  min-height:24px;
  box-sizing:border-box;
  background:#7d0001 url(/front/assets/despani/j10/modhead-red.jpg) left center repeat-x;
}
html .hm-tabsmod-wrap h3.hm-tabs-title{
  flex:1 1 auto;
  min-width:0;
  margin:0!important;
  padding:5px 8px!important;
  color:#fff!important;
  font:bold 12px Tahoma,sans-serif!important;
  line-height:1.2!important;
  background:none!important;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  letter-spacing:0;
}
html .hm-tabsmod-wrap .hm-tabs-seg{
  display:flex;
  flex:0 0 auto;
  align-items:stretch;
  margin:0;
  padding:0 2px 0 0;
  background:transparent;
  border:0;
  min-height:24px;
}
html .hm-tabsmod-wrap .hm-tab{
  flex:0 0 auto;
  min-width:min-content;
  margin:0;
  padding:0 8px;
  height:auto;
  min-height:24px;
  border:0;
  background:transparent;
  color:rgba(255,255,255,.75)!important;
  font:600 11px/24px Tahoma,sans-serif;
  letter-spacing:0;
  cursor:pointer;
  opacity:1;
  box-shadow:none;
  text-shadow:none;
  border-radius:0;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
}
html .hm-tabsmod-wrap .hm-tab:hover{color:#fff!important;background:transparent}
html .hm-tabsmod-wrap .hm-tab[aria-selected="true"],
html .hm-tabsmod-wrap .hm-tab[aria-selected="true"]:hover{
  background:transparent;
  color:#fff!important;
  font-weight:700;
  box-shadow:inset 0 -2px 0 #fff;
  opacity:1;
}
html .hm-tabsmod-wrap .hm-tab:focus-visible{outline:2px solid #fff;outline-offset:-2px}
html .hm-tabsmod-wrap .hm-tab-p[hidden]{display:none!important}
html .hm-tabsmod-wrap .j10-mod-b{padding:6px 8px 8px!important;flex:1 1 auto;min-width:0}
html .hm-tabsmod-wrap .hm-tab-p{min-width:0}

/* --- preview 1: light header, text tabs, maroon underline --- */
html .hm-ftabv-1 .hm-tabs-h{
  background:#f7f4f1;
  border-bottom:1px solid #e3d7d5;
}
html .hm-ftabv-1 h3.hm-tabs-title{color:#7d0001!important}
html .hm-ftabv-1 .hm-tab{color:#666!important;box-shadow:none}
html .hm-ftabv-1 .hm-tab:hover{color:#333!important}
html .hm-ftabv-1 .hm-tab[aria-selected="true"],
html .hm-ftabv-1 .hm-tab[aria-selected="true"]:hover{
  color:#8b1a1a!important;
  font-weight:700;
  box-shadow:inset 0 -2px 0 #8b1a1a;
  background:transparent;
}
html .hm-ftabv-1 .hm-tab:focus-visible{outline:2px solid #8b1a1a;outline-offset:-2px}

/* --- preview 2: cream header, segmented pill --- */
html .hm-ftabv-2 .hm-tabs-h{
  background:#f6efe6;
  border-bottom:1px solid #e8dccf;
  padding:3px 6px;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
html .hm-ftabv-2 h3.hm-tabs-title{color:#7d0001!important;padding:2px 4px!important}
html .hm-ftabv-2 .hm-tabs-seg{
  flex:1 1 auto;
  min-width:min-content;
  height:22px;
  min-height:22px;
  padding:0;
  border:1px solid #d9cbbb;
  border-radius:999px;
  background:#fbf6ef;
  overflow:hidden;
}
html .hm-ftabv-2 .hm-tab{
  flex:1 1 0;
  min-width:min-content;
  padding:0 10px;
  min-height:22px;
  color:#666!important;
  font:600 11px/22px Tahoma,sans-serif;
  box-shadow:none;
}
html .hm-ftabv-2 .hm-tab:hover{color:#333!important;background:#f0e6d8}
html .hm-ftabv-2 .hm-tab[aria-selected="true"],
html .hm-ftabv-2 .hm-tab[aria-selected="true"]:hover{
  background:#8b1a1a;
  color:#fff!important;
  font-weight:700;
  box-shadow:none;
}
html .hm-ftabv-2 .hm-tab:focus-visible{outline:2px solid #8b1a1a;outline-offset:-2px}

/* --- preview 3: folder tabs on top of the box --- */
html .j10-mod.hm-tabsmod-wrap.hm-ftabv-3{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}
html .hm-ftabv-3 .hm-tabs-h{
  background:transparent;
  flex-wrap:wrap;
  align-items:flex-end;
  padding:0 4px;
  min-height:0;
  gap:0;
}
html .hm-ftabv-3 h3.hm-tabs-title{
  color:#7d0001!important;
  padding:0 4px 2px 2px!important;
  flex:1 0 100%;
  overflow:visible;
  text-overflow:clip;
}
html .hm-ftabv-3 .hm-tabs-seg{
  margin-left:0;
  gap:2px;
  padding:0;
  align-items:flex-end;
  min-height:0;
  width:100%;
  justify-content:flex-start;
}
html .hm-ftabv-3 .hm-tab{
  background:#eeeae6;
  color:#666!important;
  border:1px solid #e0d8d4;
  border-bottom:0;
  border-radius:4px 4px 0 0;
  padding:0 10px;
  min-height:22px;
  font:600 11px/22px Tahoma,sans-serif;
  box-shadow:none;
}
html .hm-ftabv-3 .hm-tab:hover{color:#333!important;background:#f4f1ee}
html .hm-ftabv-3 .hm-tab[aria-selected="true"],
html .hm-ftabv-3 .hm-tab[aria-selected="true"]:hover{
  background:#fff;
  color:#222!important;
  font-weight:700;
  border-color:#e3e3e3;
  border-top:2px solid #8b1a1a;
  box-shadow:none;
  min-height:24px;
}
html .hm-ftabv-3 .j10-mod-b{
  background:#fff;
  border:1px solid #e3e3e3;
  border-radius:0 2px 2px 2px;
  padding:6px 8px 8px!important;
}
html .hm-ftabv-3 .hm-tab:focus-visible{outline:2px solid #8b1a1a;outline-offset:-2px}

/* List rows: use the pre-t783 site-wide x2r design (rank/date/thumb lead, 2-line title, meta).
   Only cap the scroll box near the old medium height so ~5 full rows show, then inner scroll. */
html .hm-tabsmod-wrap .pm,
html .hm-tabsmod-wrap .pm-capped,
html .hm-tabsmod-wrap .pm-fixed{--pm-maxh:265px}
html .hm-tabsmod-wrap .pm-capped .pm-scroll,
html .hm-tabsmod-wrap .pm-fixed .pm-scroll,
html .hm-tabsmod-wrap .pm-fixed.pm-capped .pm-scroll{
  height:auto!important;
  max-height:265px!important;
}

/* t804: three center tabbed modules stretch to one height; More button, arrows,
   and the bottom link sit at the bottom of each column so they line up.
   List rows and their x2r design are unchanged; the scroll box still caps at 265px. */
html .hm-tabsmod-wrap .j10-mod-b{
  display:flex;
  flex-direction:column;
}
html .hm-tabsmod-wrap .hm-tab-p:not([hidden]){
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-width:0;
  min-height:0;
}
html .hm-tabsmod-wrap .pm{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-width:0;
  min-height:0;
}
html .hm-tabsmod-wrap .pm-foot{
  margin-top:auto;
}
html .hm-tabsmod-wrap .hm-more{
  margin-top:6px;
  flex:none;
}

/* t807 preview: ?f3up=1 puts the three center tabbed modules in one row
   inside the ~460px mid column. Default (no param) is unchanged.
   List rows keep the x2r design (2-line titles, meta, folder tabs);
   equal heights and pinned footers stay as in t804.
   At ~148px per column the default tab padding and the centered
   More+arrows grid overflow, so this preview only tightens padding,
   slightly shrinks the 32px lead/thumb to 28px, and lays the footer
   out as a compact centered row (wraps the arrows underneath if needed).
   :is(html,#x2-pm,#x2-mod) is on the prefix so these rules beat the
   #x2-pm / #x2-mod row and footer styles. */
html[data-f3up="1"] .dx-pos[data-pos="center"].dx-pos-horizontal{
  flex-wrap:nowrap;
}
html[data-f3up="1"] .dx-pos[data-pos="center"].dx-pos-horizontal>.hm-tabsmod-wrap{
  flex:1 1 0%;
  min-width:0;
  max-width:none;
}
html[data-f3up="1"] .dx-pos[data-pos="center"] .hm-tabsmod-wrap .j10-mod-b,
html[data-f3up="1"] .dx-pos[data-pos="center"] .hm-ftabv-3 .j10-mod-b{
  padding:6px 5px 6px!important;
}
html[data-f3up="1"] .dx-pos[data-pos="center"] .hm-ftabv-3 .hm-tab{
  padding:0 4px;
}
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .hm-tabsmod-wrap .x2r{
  gap:6px;
}
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .hm-tabsmod-wrap .x2r-lead{
  width:28px;
  height:28px;
}
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .hm-tabsmod-wrap .x2r-thumb img{
  width:28px;
  height:28px;
}
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .pm-foot,
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .pm-foot.pm-has-nav,
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .pm-fixed .pm-foot,
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .pm-fixed .pm-foot:not(.pm-has-nav){
  display:flex;
  justify-content:center;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .pm-foot .pm-more,
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .pm-fixed .pm-foot .pm-more,
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .pm-fixed .pm-more{
  grid-column:auto;
  flex:0 0 auto;
  min-width:0;
  min-height:24px;
  padding:3px 8px 3px 7px;
  font-size:11px;
  gap:4px;
  white-space:nowrap;
}
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .pm-nav{
  grid-column:auto;
  justify-self:auto;
  flex:none;
  gap:2px;
}
html[data-f3up="1"]:is(html,#x2-pm,#x2-mod) .dx-pos[data-pos="center"] .pm-nav-b{
  width:20px;
  height:20px;
}
