/*
Theme Name: Understrap
Theme URI: https://understrap.com
Author: Howard Development &amp; Consulting
Author URI: https://howarddc.com
GitHub Theme URI: https://github.com/understrap/understrap
Description: The renowned WordPress starter theme framework that combined Underscores and Bootstrap. Trusted by more than 100,000 developers for building handcrafted, custom WordPress sites.
Version: 1.1.0
Requires at least: 5.0
Tested up to: 5.8.1
Requires PHP: 5.2
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: understrap
Tags: one-column, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, theme-options, translation-ready, block-styles, wide-blocks, editor-style, threaded-comments, accessibility-ready

Understrap WordPress Theme, (C) 2021 Howard Development & Consulting, LLC
Understrap is distributed under the terms of the GNU GPL.

Resource Licenses:
Understrap is based on Underscores https://underscores.me/, (C) Automattic, Inc.
Font Awesome: https://fontawesome.com/v4.7/license/ (Font: SIL OFL 1.1, (S)CSS: MIT)
Bootstrap: https://getbootstrap.com | https://github.com/twbs/bootstrap/blob/master/LICENSE (MIT)
WP Bootstrap Navwalker by Edward McIntyre & William Patton: https://github.com/twittem/wp-bootstrap-navwalker (GNU GPLv3)
*/

/*
Do not modify the parent Understrap theme. Instead, download a copy of the Understrap Child starter theme and do all your development within the child theme.
Full developer documentation: https://docs.understrap.com
*/

/* Headings — readable scale on desktop + phone */
h1,
.h1,
.entry-title {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 0.85rem !important;
}

h2,
.h2,
.faq-title {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 1.75rem 0 0.85rem !important;
}

h3,
.h3 {
  font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.25rem) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.015em;
  color: #0f172a;
  margin: 1.5rem 0 0.7rem !important;
}

h4,
.h4 {
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.125rem) !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #0f172a;
  margin: 1.25rem 0 0.55rem !important;
}

h5,
.h5,
h6,
.h6 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #0f172a;
  margin: 1.1rem 0 0.45rem !important;
}

.entry-content > h2:first-child,
.entry-content > h3:first-child {
  margin-top: 0.5rem !important;
}

.entry-header .entry-title {
  margin-bottom: 1rem !important;
}

/* Keep lottery title + country line tight */
.lotto-page-heading-wrap .entry-title,
.lotto-page-heading__text .entry-title,
.entry-header .lotto-page-heading-wrap .entry-title,
.entry-header .lotto-page-heading__text .entry-title {
  margin: 0 !important;
}

@media (max-width: 575.98px) {
  h1,
  .h1,
  .entry-title {
    font-size: 1.5rem !important;
    line-height: 1.22 !important;
    margin-bottom: 0.75rem !important;
  }

  h2,
  .h2,
  .faq-title {
    font-size: 1.25rem !important;
    line-height: 1.28 !important;
    margin: 1.4rem 0 0.7rem !important;
  }

  h3,
  .h3 {
    font-size: 1.125rem !important;
    line-height: 1.3 !important;
    margin: 1.25rem 0 0.55rem !important;
  }

  h4,
  .h4 {
    font-size: 1.05rem !important;
    margin: 1.1rem 0 0.45rem !important;
  }

  h5,
  .h5,
  h6,
  .h6 {
    font-size: 0.975rem !important;
  }
}
/* FAQ accordion — matches lottery card look */
.faq {
  margin: 2.5rem 0 2rem;
  width: 100%;
  max-width: none;
}
.faq-title {
  margin: 0 0 1rem !important;
  color: #0f172a;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--lotto-radius-card, 10px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item[open],
.faq-item:hover {
  border-color: #dbeafe;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  color: #0f172a;
  user-select: none;
}
.faq-item[open] .faq-question {
  padding-bottom: 0.45rem;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::marker {
  content: "";
}
.faq-question-text {
  flex: 1;
}
.faq-icon {
  position: relative;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eff6ff;
  transition: background 0.2s ease, transform 0.2s ease;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: #2563eb;
  border-radius: 2px;
  transform: translate(-50%, -50%);
}
.faq-icon::before {
  width: 12px;
  height: 2px;
}
.faq-icon::after {
  width: 2px;
  height: 12px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.faq-item[open] .faq-icon {
  background: #dbeafe;
}
.faq-item[open] .faq-icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}
.faq-answer {
  padding: 0 1.15rem 0.95rem;
  color: #475569;
  font-size: 0.975rem;
  line-height: 1.55;
}
.faq-answer p {
  margin: 0 !important;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.4rem;
}
@media (max-width: 575.98px) {
  .faq-question {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }
  .faq-item[open] .faq-question {
    padding-bottom: 0.4rem;
  }
  .faq-answer {
    padding: 0 1rem 0.85rem;
    font-size: 0.925rem;
  }
}

/* Content comparison / data tables */
.entry-content .wp-block-table,
.entry-content .table-scroll {
  width: 100%;
  margin: 1.25rem 0 1.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.entry-content .wp-block-table table,
.entry-content .table-scroll table,
.entry-content table {
  width: 100%;
  min-width: 640px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

/* Lottery history uses card layout — do not force 640px scroll width */
.entry-content .lottery-history,
.entry-content .lottery-history .table-scroll,
.entry-content .lottery-history table,
.entry-content table.history-table {
  min-width: 0;
  max-width: 100%;
}

.entry-content .lottery-history .table-scroll {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
}

/* Kill theme zebra / sticky / hover paints on history draws */
.entry-content .lottery-history table,
.entry-content .lottery-history table thead th,
.entry-content .lottery-history table tbody td,
.entry-content .lottery-history table tbody tr:nth-child(even) td,
.entry-content .lottery-history table tbody tr:hover td,
.entry-content .lottery-history table tbody td:first-child,
.entry-content .lottery-history table tbody tr:nth-child(even) td:first-child,
.entry-content .lottery-history table tbody tr:hover td:first-child,
.entry-content .lottery-history table thead th:first-child {
  background: transparent !important;
  box-shadow: none !important;
  position: static !important;
  border-radius: 0 !important;
}

.entry-content .lottery-history table thead {
  display: none;
}

.entry-content .lottery-history table tbody td {
  border-bottom: 0 !important;
  padding: 0 !important;
  color: inherit;
  vertical-align: middle;
}

.entry-content .lottery-history__row {
  background: #fff;
}

.entry-content .lottery-history__row:hover {
  background: #fff;
}

.entry-content table thead th {
  background: #eff6ff;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.925rem;
  letter-spacing: -0.01em;
  text-align: left;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #dbeafe;
  white-space: nowrap;
}

.entry-content .wp-block-table table thead th:first-child,
.entry-content .table-scroll table thead th:first-child {
  border-radius: 15px 0 0 0;
}

.entry-content .wp-block-table table thead th:last-child,
.entry-content .table-scroll table thead th:last-child {
  border-radius: 0 15px 0 0;
}

.entry-content table tbody td {
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.entry-content table tbody tr:last-child td {
  border-bottom: none;
}

.entry-content table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.entry-content table tbody tr:hover td {
  background: #eff6ff;
}

.entry-content table tbody td:first-child {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  background: #fff;
}

.entry-content table tbody tr:nth-child(even) td:first-child {
  background: #f8fafc;
}

.entry-content table tbody tr:hover td:first-child {
  background: #eff6ff;
}

.entry-content table thead th:first-child {
  background: #dbeafe;
}

/* Sticky first column — desktop/tablet only */
@media (min-width: 576px) {
  .entry-content table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 4px 0 8px -6px rgba(15, 23, 42, 0.18);
  }

  .entry-content table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
  }
}

.entry-content .wp-block-table figcaption {
  padding: 0.65rem 1.1rem 0.85rem;
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
}

@media (max-width: 575.98px) {
  .entry-content table thead th,
  .entry-content table tbody td {
    padding: 0.75rem 0.85rem;
    font-size: 0.875rem;
  }

  .entry-content table tbody td:first-child,
  .entry-content table thead th:first-child {
    position: static;
    box-shadow: none;
  }
}

/* Auto table of contents — compact float beside content (not sticky) */
.toc {
  margin: 0.15rem 0 1.25rem;
  padding: 0.85rem 0.9rem 0.8rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
#draws + .toc {
  margin-top: 0.1rem;
}
#draws + br,
.entry-content br:has(+ .toc),
.entry-content p:has(> br:only-child):has(+ .toc) {
  display: none;
}
.toc-title {
  margin: 0 0 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.toc-item {
  margin: 0;
  padding: 0;
  counter-increment: toc;
}
.toc-link {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  transition: background 0.15s ease, color 0.15s ease;
}
.toc-link::before {
  content: counter(toc, decimal-leading-zero);
  flex: 0 0 auto;
  min-width: 1.35rem;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.toc-link:hover,
.toc-link:focus {
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
}

@media (min-width: 992px) {
  .entry-content .toc {
    float: right;
    width: min(240px, 30%);
    max-width: 260px;
    margin: 2.8em 0 1rem 1.25rem;
    position: static;
  }

  #draws + .toc {
    margin: 2.8em 0 1rem 1.25rem;
  }

  .entry-content .faq,
  .entry-content .table-scroll,
  .entry-content .wp-block-table,
  .entry-content .more-games-title,
  .entry-content #lotteries-list,
  .entry-content .lottery-games {
    clear: both;
  }
}

/* Offset anchor jumps under sticky headers */
.entry-content h2[id],
.faq-title[id] {
  scroll-margin-top: 5.5rem;
}

@media (max-width: 991.98px) {
  .entry-content .toc {
    float: none;
    width: 100%;
    max-width: none;
    margin: 0.15rem 0 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .toc {
    padding: 0.85rem 0.9rem 0.8rem;
  }
  .toc-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.45rem;
  }
}

/* Footer menu (Appearance -> Menus -> Footer Menu) */
.site-footer .footer-nav {
  margin: 0.35rem 0 0;
  color: #94a3b8;
  font-size: 0.76rem;
  line-height: 1.2;
  font-weight: 400;
}

.site-footer .footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
  align-items: center;
}

.site-footer .footer-menu li {
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}

.site-footer .footer-menu li + li::before {
  content: "|";
  color: #94a3b8;
  margin: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.site-footer .footer-menu a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  transition: color 0.15s ease;
  opacity: 1;
  display: inline-flex;
  align-items: center;
}

.site-footer .footer-menu a:hover,
.site-footer .footer-menu a:focus {
  color: #64748b;
  text-decoration: none;
}

@media (max-width: 575.98px) {
  .site-footer .footer-nav {
    margin-top: 0.25rem;
  }
}