/* ============================================================
   ESWATINI CHESS FEDERATION — Modern Design System (2026)
   Chess theme: deep green + gold + cream. Sora/Inter typography.
   Loaded via mu-plugin swz-site.php
   ============================================================ */

:root {
  --swz-ink: #101613;
  --swz-dark: #16211c;
  --swz-dark-2: #1c2a24;
  --swz-green: #1f5c47;
  --swz-green-2: #2a7a5e;
  --swz-gold: #d9a521;
  --swz-gold-2: #e8bc3a;
  --swz-cream: #f6f3ea;
  --swz-paper: #ffffff;
  --swz-line: #e5dfd0;
  --swz-text: #333b36;
  --swz-muted: #6b756f;
  --swz-radius: 14px;
  --swz-shadow: 0 2px 10px rgba(16, 22, 19, 0.06);
  --swz-shadow-lg: 0 10px 30px rgba(16, 22, 19, 0.12);
  --swz-font-head: 'Sora', 'Inter', -apple-system, sans-serif;
  --swz-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  font-family: var(--swz-font-body);
  color: var(--swz-text);
  background: var(--swz-paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.elementor-widget-heading .elementor-heading-title {
  font-family: var(--swz-font-head);
  color: var(--swz-ink);
  letter-spacing: -0.01em;
}

a { color: var(--swz-green); }

/* ---------- HEADER (Astra) ---------- */
#masthead,
header.site-header,
.ast-primary-header-bar {
  background: var(--swz-dark) !important;
  border-bottom: 3px solid var(--swz-gold);
}
.main-header-menu .menu-link,
.main-navigation .menu-link,
.ast-builder-menu .menu-item > a {
  color: #f2efe4 !important;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.main-header-menu .menu-link:hover,
.main-navigation .menu-link:hover {
  color: var(--swz-gold) !important;
}
.main-header-menu .current-menu-item > .menu-link,
.main-navigation .current-menu-item > a {
  color: var(--swz-gold) !important;
}
.site-logo-img img {
  border-radius: 10px;
}
.ast-builder-layout-element .site-title, .site-title {
  font-family: var(--swz-font-head);
}

/* ---------- HERO ---------- */
.swz-hero {
  position: relative;
  background:
    radial-gradient(1000px 480px at 85% -10%, rgba(42, 122, 94, 0.45), transparent 60%),
    radial-gradient(800px 420px at 8% 110%, rgba(217, 165, 33, 0.18), transparent 55%),
    linear-gradient(160deg, var(--swz-dark) 0%, var(--swz-dark-2) 55%, #0f1a14 100%);
  overflow: hidden;
}
.swz-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.swz-hero::after {
  content: "♞";
  position: absolute;
  right: -30px;
  bottom: -70px;
  font-size: 340px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  transform: rotate(-8deg);
}
.swz-hero .elementor-column {
  position: relative;
  z-index: 2;
}
.swz-kicker {
  display: inline-block;
  font-family: var(--swz-font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--swz-gold);
  border: 1px solid rgba(217, 165, 33, 0.4);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 6px;
}
.swz-hero .elementor-widget-heading .elementor-heading-title {
  color: #fdfcf7 !important;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.08;
}
.swz-hero .elementor-widget-text-editor {
  color: #d6dcd7 !important;
  font-size: 17px;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ---------- BUTTONS ---------- */
.swz-hero .elementor-widget-button .elementor-button,
.elementor-widget-button .elementor-button {
  font-family: var(--swz-font-head);
  font-weight: 600;
  border-radius: 999px;
  padding: 14px 30px;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.swz-hero .elementor-widget-button .elementor-button {
  background: var(--swz-gold);
  color: var(--swz-ink);
  border: 2px solid var(--swz-gold);
}
.swz-hero .elementor-widget-button .elementor-button:hover {
  background: var(--swz-gold-2);
  border-color: var(--swz-gold-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(217, 165, 33, 0.35);
}
.elementor-widget-button .elementor-button {
  background: var(--swz-green);
  color: #fff;
  border: 2px solid var(--swz-green);
}
.elementor-widget-button .elementor-button:hover {
  background: var(--swz-green-2);
  border-color: var(--swz-green-2);
  transform: translateY(-2px);
  box-shadow: var(--swz-shadow-lg);
}

/* ---------- SECTIONS ---------- */
.swz-section {
  padding: 26px 0 10px;
}
.swz-section .elementor-widget-heading .elementor-heading-title {
  font-size: 30px;
  font-weight: 700;
  position: relative;
  padding-bottom: 14px;
}
.swz-section .elementor-widget-heading .elementor-heading-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  width: 64px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--swz-gold), var(--swz-green-2));
}
.swz-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
  padding-top: 18px;
}

/* ---------- FEATURED EVENT CALL-OUT ---------- */
.swz-featured {
  background: linear-gradient(120deg, #fffdf4, #fdf6e0);
  border: 1px solid #f0e4bd;
  border-radius: var(--swz-radius);
  box-shadow: var(--swz-shadow);
}
.swz-featured .elementor-heading-title {
  color: var(--swz-green) !important;
  font-size: 22px !important;
}
.swz-featured .elementor-button {
  background: var(--swz-gold) !important;
  border-color: var(--swz-gold) !important;
  color: var(--swz-ink) !important;
}

/* ---------- TABLEPRESS TABLES ---------- */
.tablepress {
  --head-bg: var(--swz-dark);
  font-size: 14.5px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--swz-shadow);
  border: 1px solid var(--swz-line);
  width: 100%;
}
.tablepress thead th {
  background: var(--swz-dark);
  color: #f2efe4 !important;
  font-family: var(--swz-font-head);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--swz-gold);
  padding: 13px 14px;
}
.tablepress tbody tr td {
  padding: 11px 14px;
  border-top: 1px solid #f0ece0;
  color: var(--swz-text);
}
.tablepress tbody tr:nth-child(even) td { background: #faf8f1; }
.tablepress tbody tr:hover td { background: #f3efdf; }
.tablepress .column-1 { font-weight: 700; color: var(--swz-green); }
.tablepress-id-1 tbody tr:nth-child(1) td,
.tablepress-id-1 tbody tr:nth-child(2) td,
.tablepress-id-1 tbody tr:nth-child(3) td,
.tablepress-id-2 tbody tr:nth-child(1) td,
.tablepress-id-2 tbody tr:nth-child(2) td,
.tablepress-id-2 tbody tr:nth-child(3) td,
.tablepress-id-6 tbody tr:nth-child(1) td,
.tablepress-id-6 tbody tr:nth-child(2) td,
.tablepress-id-6 tbody tr:nth-child(3) td {
  background: #fbf4e0;
}
/* Hide DataTables chrome on small tables (teams, players, schools) */
#tablepress-1_wrapper .dataTables_filter,
#tablepress-1_wrapper .dataTables_length,
#tablepress-1_wrapper .dataTables_info,
#tablepress-1_wrapper .dataTables_paginate,
#tablepress-2_wrapper .dataTables_filter,
#tablepress-2_wrapper .dataTables_length,
#tablepress-2_wrapper .dataTables_info,
#tablepress-2_wrapper .dataTables_paginate,
#tablepress-6_wrapper .dataTables_filter,
#tablepress-6_wrapper .dataTables_length,
#tablepress-6_wrapper .dataTables_info,
#tablepress-6_wrapper .dataTables_paginate {
  display: none !important;
}

/* ---------- EVENTS (Events Manager) ---------- */
/* EM search buttons — fix invisible/grey buttons on white.
   EM's own .em button.em-clickable sets border:0 !important; padding:0 !important;
   background transparent, so these MUST use higher specificity (2+ classes + element)
   and !important on every property, or the buttons render as faint bare text. */
.em button.em-clickable.em-search-advanced-trigger,
.em button.em-clickable.em-search-view-option,
.em.em-search .em-search-views .em-search-views-trigger button.em-search-view-option,
.em.em-search-advanced .em-search-views .em-search-views-trigger button.em-search-view-option,
.em-search-main button.em-search-submit,
.em button.em-clickable.em-search-submit,
.em-search-main .em-search-submit,
.em button.em-clickable.em-tooltip.em-search-advanced-trigger {
  background-color: var(--swz-paper) !important;
  background-image: none !important;
  color: var(--swz-green) !important;
  border: 1px solid var(--swz-green) !important;
  border-radius: 999px !important;
  padding: 8px 18px !important;
  margin: 0 4px 0 0 !important;
  font-family: var(--swz-font-head) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  line-height: 1.3 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  outline: none;
  text-decoration: none;
  justify-self: auto !important;
  width: auto !important;
  min-height: 0 !important;
}
.em.pixelbones button.em-search-submit.button-primary,
.em.pixelbones .em-search-submit.button-primary.button,
.em.pixelbones input[type="submit"].em-search-submit,
.em-search-main button.em-search-submit,
.em-search-submit.button-primary,
.em-search-submit.button {
  background-color: var(--swz-green) !important;
  color: #ffffff !important;
  border-color: var(--swz-green) !important;
}
.em button.em-clickable.em-search-advanced-trigger:hover,
.em button.em-clickable.em-search-view-option:hover,
.em-search-main button.em-search-submit:hover {
  background-color: var(--swz-green-2) !important;
  border-color: var(--swz-green-2) !important;
  color: #ffffff !important;
}
/* Clear All (disabled by EM) — keep readable, not ghosted.
   EM's .em.pixelbones .input button:not(...).disabled (0,5,1) sets opacity .5 !
   → must match that specificity or higher. */
.em.pixelbones .input button.button-secondary.disabled,
.em.pixelbones .input button.button-secondary.disabled[aria-disabled] {
  background-color: transparent !important;
  border: 1px solid var(--swz-line) !important;
  color: var(--swz-ink) !important;
  opacity: 1 !important;
  padding: 8px 18px !important;
  border-radius: 999px !important;
  font-family: var(--swz-font-head) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
}
.em-search-main input[type="text"], .em-search input[type="text"],
.em-search-main input[type="search"], .em-search input[type="search"],
.em-search-main input[type="date"], .em-search input[type="date"],
.em-search-main select, .em-search select {
  border: 1px solid var(--swz-line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--swz-paper);
}
/* hide "Map Unavailable" placeholder on event pages without a location */
.em-location-map-container,
.em-event-meta .em-location-map,
.single-event .em-location-map-container,
.em-event-single div:has(> i) {
  display: none !important;
}

.em-view-container .events-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 14px;
  margin: 0;
}
.em-view-container .events-table thead { display: none; }
.em-view-container .events-table tbody { display: block; }
.em-view-container .events-table tbody tr {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--swz-paper);
  border: 1px solid var(--swz-line);
  border-left: 5px solid var(--swz-gold);
  border-radius: 12px;
  padding: 16px 22px;
  box-shadow: var(--swz-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.em-view-container .events-table tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: var(--swz-shadow-lg);
}
.em-view-container .events-table tbody tr td { display: block; border: none; padding: 0; background: none !important; }
.em-view-container .events-table tbody tr td:first-child {
  flex: 0 0 210px;
  font-family: var(--swz-font-head);
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--swz-green);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-right: 1px dashed var(--swz-line);
  padding-right: 20px;
}
.em-view-container .events-table tbody tr td:last-child {
  font-size: 17px;
  font-weight: 600;
  font-family: var(--swz-font-head);
}
.em-view-container .events-table tbody tr td:last-child a { color: var(--swz-ink); text-decoration: none; }
.em-view-container .events-table tbody tr td:last-child a:hover { color: var(--swz-gold); }

/* ---------- NEWS CARDS ---------- */
.swz-news {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.swz-news-card {
  background: var(--swz-paper);
  border: 1px solid var(--swz-line);
  border-radius: var(--swz-radius);
  padding: 22px 24px;
  box-shadow: var(--swz-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.swz-news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--swz-shadow-lg);
}
.swz-news-date {
  font-family: var(--swz-font-head);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--swz-gold);
  background: #fbf3d9;
  border-radius: 999px;
  padding: 5px 12px;
  align-self: flex-start;
}
.swz-news-title {
  font-family: var(--swz-font-head);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--swz-ink);
  text-decoration: none;
}
.swz-news-title:hover { color: var(--swz-green); }
.swz-news-excerpt {
  font-size: 14px;
  color: var(--swz-muted);
  line-height: 1.6;
  flex: 1;
}
.swz-news-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--swz-green);
  letter-spacing: 0.02em;
}
.swz-news-more {
  font-family: var(--swz-font-head);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--swz-green);
  text-decoration: none;
}
.swz-news-more:hover { color: var(--swz-gold); }
.swz-news-empty {
  color: var(--swz-muted);
  padding: 20px;
  border: 1px dashed var(--swz-line);
  border-radius: 12px;
  grid-column: 1 / -1;
  text-align: center;
}

/* ---------- SPONSORS ---------- */
.swz-sponsors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.swz-sponsor-logo {
  background: var(--swz-paper);
  border: 1px solid var(--swz-line);
  border-radius: 12px;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-shadow: var(--swz-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.swz-sponsor-logo:hover {
  transform: translateY(-3px);
  box-shadow: var(--swz-shadow-lg);
}
.swz-sponsor-logo img {
  max-width: 100%;
  max-height: 64px;
  object-fit: contain;
}
.swz-sponsor-cta {
  margin-top: 22px;
  text-align: center;
  font-size: 14.5px;
  color: var(--swz-muted);
}
.swz-sponsor-cta a {
  color: var(--swz-gold);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- PAGES (ratings / clubs / news) ---------- */
.entry-content h2,
.page .entry-title,
.single .entry-title {
  font-family: var(--swz-font-head);
  color: var(--swz-ink);
}
.entry-title {
  font-size: 34px;
  font-weight: 700;
}
.ast-container .elementor-widget-heading .elementor-heading-title {
  font-size: 24px;
}

/* ---------- FOOTER ---------- */
.site-footer,
.ast-small-footer,
.ast-footer-overlay {
  background: var(--swz-dark) !important;
  color: #c9d0cb;
}
.site-footer a, .ast-small-footer a {
  color: var(--swz-gold);
}
.ast-small-footer {
  border-top: 3px solid var(--swz-gold);
  padding: 22px 0;
  font-size: 13.5px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .swz-hero .elementor-widget-heading .elementor-heading-title {
    font-size: 32px;
  }
  .em-view-container .events-table tbody tr {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .em-view-container .events-table tbody tr td:first-child {
    flex: none;
    border-right: none;
    border-bottom: 1px dashed var(--swz-line);
    padding-right: 0;
    padding-bottom: 10px;
  }
  .swz-section .elementor-widget-heading .elementor-heading-title {
    font-size: 24px;
  }
  .tablepress { font-size: 13px; }
  .tablepress thead th, .tablepress tbody tr td { padding: 9px 10px; }
}
