/* LAYOUT-030: presentation adapter for native MyAAC pages inside the new shell.
 * Keep the native forms, data, filters, hooks, status colors and item sprites.
 * Authentication uses its own .andz components; this layer does not restyle them.
 */

.af-hscroll { padding-bottom: 4px; }
.af-hscroll :where(table) { max-width: 100%; border-spacing: 0; }
.af-hscroll :where(td, th) { overflow-wrap: normal; word-break: normal; }
.af-hscroll :where(h2, h3, h4) {
  color: var(--af-navy-800);
  font-family: var(--af-font-display);
  line-height: 1.35;
}
.af-hscroll :where(h2) { font-size: 22px; margin: 8px 0 20px; }
.af-hscroll :where(h3) { font-size: 18px; }

/* Both plain data tables and the Table1..5 family share the same surfaces. */
.af-hscroll :where(tr[bgcolor], td[bgcolor], .Odd) {
  background-color: var(--af-parchment-100);
}
.af-hscroll :where(tr[bgcolor]:nth-child(odd), .Even) {
  background-color: var(--af-parchment-200);
}
.af-hscroll :where(tr[bgcolor] > td, tr.Odd > td, tr.Even > td, .TableContent > tbody > tr > td) {
  font-family: var(--af-font-ui);
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--af-parchment-400);
  vertical-align: middle;
}
.af-hscroll :where(td.white, th, .CaptionContainer) {
  background: var(--af-gradient-navy) !important;
  color: var(--af-color-text-gold) !important;
  border-bottom: 1px solid var(--af-gold-500);
}
.af-hscroll :where(td.white, th) {
  padding: 12px;
  font-weight: 700;
}
.af-hscroll :where(td.white, th) :where(a, b, strong) { color: inherit; }
.af-hscroll :where(td.white, th) a { text-decoration: underline; }
.af-hscroll :where(.TableContainer) {
  border: 1px solid var(--af-parchment-400);
  border-radius: 5px;
  width: 100%;
  font-size: 16px;
  margin-block: 12px;
}
.af-hscroll :where(.CaptionContainer, .CaptionInnerContainer) {
  font-size: 16px;
  padding: 0;
  position: relative;
}
.af-hscroll .CaptionInnerContainer { background: transparent !important; }
.af-hscroll .CaptionContainer .Text {
  padding: 12px;
  color: var(--af-color-text-gold);
  font: 700 16px/1.5 var(--af-font-display);
}
.af-hscroll :where(.CaptionEdgeLeftTop, .CaptionEdgeRightTop, .CaptionEdgeLeftBottom,
  .CaptionEdgeRightBottom, .CaptionBorderTop, .CaptionBorderBottom,
  .CaptionVerticalLeft, .CaptionVerticalRight, .TableShadowContainerRightTop,
  .TableShadowRightTop, .TableBottomShadow, .TableBottomLeftShadow,
  .TableBottomRightShadow, .TableBottomBorder) { display: none; }
.af-hscroll :where(.Table1, .Table2, .Table3, .Table4, .Table5) {
  border: 0;
  background: transparent !important;
  border-spacing: 0;
}
.af-hscroll :where(.Table1, .Table2, .Table3, .Table4, .Table5) > tbody > tr > td {
  padding: 8px;
  border: 0;
}
.af-hscroll :where(.InnerTableContainer, .TableContentContainer, .TableContentAndRightShadow) {
  margin: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
}
.af-hscroll .TableContent { border-collapse: collapse; }

/* The same blue action as "Abrir fórum", including keyboard and touch states. */
.af-native-action { display: inline-flex; max-width: 100%; margin: 4px 0; }
.af-shell .af-hscroll :where(input[type="submit"], input[type="button"], button, .af-native-action .af-btn):not(.andz *) {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 120px;
  max-width: 100%;
  min-height: 44px;
  height: auto;
  padding: 10px 18px;
  border: 1px solid var(--af-gold-600);
  border-radius: var(--af-radius-button);
  background: var(--af-gradient-blue-button);
  box-shadow: var(--af-shadow-control);
  color: #fff;
  font: 700 14px/1.4 var(--af-font-display);
  text-shadow: 0 1px 1px rgb(0 0 0 / 45%);
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
}
.af-shell .af-hscroll .af-btn--play { background: var(--af-gradient-emerald); }
.af-shell .af-hscroll .af-btn--danger { background: linear-gradient(#b44639, #752720); }
.af-hscroll :where(input[type="submit"], input[type="button"], button):not(.andz *):hover { filter: brightness(1.12); }
.af-hscroll :where(input[type="submit"], input[type="button"], button):disabled {
  opacity: .6;
  cursor: not-allowed;
}
.af-hscroll :where(input, select, textarea, button, a):focus-visible {
  outline: 3px solid var(--af-navy-500);
  outline-offset: 3px;
}
.af-hscroll :where(input:not([type]), input[type="text"], input[type="password"], input[type="email"],
  input[type="number"], input[type="search"], select, textarea):not(.andz *) {
  box-sizing: border-box;
  min-height: 44px;
  max-width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--af-parchment-500);
  border-radius: 4px;
  background: var(--af-parchment-50);
  color: var(--af-color-text);
  font: 16px/1.5 var(--af-font-ui);
}
.af-hscroll :where(input[type="radio"], input[type="checkbox"]):not(.andz *) {
  accent-color: var(--af-blue-action-700);
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin: 10px 6px;
}
.af-hscroll :where(.size_xxs, .size_xs, .size_small) { font-size: 14px; line-height: 1.6; }

/* Original news story is stored content. Harmonize its presentation, not its data. */
.af-hscroll #andaime-home {
  font-family: var(--af-font-editorial) !important;
  background: transparent !important;
  border: 0 !important;
  color: var(--af-color-text) !important;
}
.af-hscroll #andaime-home > div { padding: 24px 0 !important; }
.af-hscroll #andaime-home h2 {
  color: var(--af-navy-800) !important;
  font-family: var(--af-font-display) !important;
  font-size: 24px !important;
}
.af-hscroll #andaime-home p { color: var(--af-color-text) !important; font-size: 16px !important; }
.af-hscroll #andaime-home a { color: var(--af-color-link) !important; }
.af-hscroll #andaime-home a[href="/play/"],
.af-hscroll #andaime-home a[href="/index.php/account/create"] {
  display: inline-flex !important;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--af-gold-600) !important;
  border-radius: var(--af-radius-button) !important;
  box-shadow: var(--af-shadow-control);
  font-family: var(--af-font-display);
  background: var(--af-gradient-blue-button) !important;
  color: #fff !important;
}
.af-hscroll #andaime-home a[href="/play/"] { background: var(--af-gradient-emerald) !important; }

/* The upstream ranking uses a second sidebar in its data table. Stack that
 * optional navigation below the results so six data columns stay readable. */
.af-ranking-layout, .af-ranking-layout > tbody, .af-ranking-layout > tbody > tr { display: block; width: 100%; min-width: 0; }
.af-ranking-layout > tbody > tr > td { display: block; width: 100%; padding: 0; }
.af-ranking-layout > tbody > tr > td:empty { display: none; }
.af-ranking-filters > tbody > tr { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.af-ranking-filters > tbody > tr > td { padding: 0; flex: 1 1 160px; }
.af-ranking-filters > tbody > tr > td:first-child { flex-basis: 100%; font-weight: 700; }
.af-ranking-filters label { display: block; margin-bottom: 4px; }
.af-ranking-filters select { width: 100%; }
.af-shell .af-ranking-table td { font-size: 14px; padding: 10px 7px; }
.af-ranking-table td.white, .af-ranking-table td:last-child { white-space: nowrap; }
.af-ranking-table { min-width: 460px; }
.af-native-table-scroll { max-width: 100%; overflow-x: auto; }
.af-ranking-links { margin-top: 24px; text-align: left; }
.af-ranking-links a { display: inline-block; margin: 4px 12px 4px 0; }
.af-ranking-links br { display: none; }

.af-character-layout > tbody > tr > td:first-child,
.af-character-layout > tbody > tr > td:last-child { display: none; }
.af-character-outfit { display: flex; justify-content: end; margin: 0 0 12px; }
.af-character-outfit img { width: 96px; height: 96px; object-fit: contain; }
.af-character-details > tbody > tr { display: flex; flex-wrap: wrap; gap: 12px; }
.af-character-details > tbody > tr > td { flex: 1 1 210px; padding: 0; }
.af-native-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.af-native-search label { flex-basis: 100%; font-weight: 600; }
.af-native-search input[name="name"] { flex: 1 1 160px; min-width: 0; width: 100%; }
.af-native-search .af-native-action { margin: 0; }

@media (max-width: 760px) {
  .af-hscroll :where(tr[bgcolor] > td, tr.Odd > td, tr.Even > td, .TableContent > tbody > tr > td) { padding: 8px; }
  .af-shell .af-hscroll :where(input[type="submit"], input[type="button"], button, .af-native-action .af-btn):not(.andz *) { min-height: 48px; padding: 10px 12px; }
  .af-hscroll :where(h2) { font-size: 20px; }
}
