/*
Theme Name: Lotto
Theme URI: http://localhost:8080/
Author: Lottery Scraper Project
Description: Temă de rezultate și statistici loto, construită peste template-ul LotteryPro (varianta light). Paginile de loterii sunt servite din tabele proprii, alimentate din baza SQLite a scraperelor.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: lotto
*/

/* ==========================================================================
   0a. Reset
   Bootstrap's Reboot used to provide this. Dropping Bootstrap removed it, and
   without border-box every padded container overflowed its own width.
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
    margin: 0;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
}

img,
svg {
    vertical-align: middle;
}

table {
    border-collapse: collapse;
}

/* ==========================================================================
   0. Layout primitives
   These are the only Bootstrap classes the markup ever used (container, row,
   col-lg-9, justify-content-center). Reimplementing them here let us drop
   bootstrap.min.css entirely - 152KB raw / 22KB gzipped and one request - along
   with template.css, whose remaining rules all target sections this theme does
   not render.
   ========================================================================== */

.container {
    width: 100%;
    margin-inline: auto;
    padding-inline: 16px;
}

@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-inline: -12px;
}

.row > [class^="col-"] {
    padding-inline: 12px;
    width: 100%;
}

.justify-content-center { justify-content: center; }

@media (min-width: 992px) {
    .col-lg-9 { width: 75%; }
}

/* ==========================================================================
   1. Tokens
   Taken from the template's light palette so the components we reuse from
   template.css (buttons, banner, breadcrumb) stay visually consistent.
   ========================================================================== */

:root {
    --lt-green: #448C74;
    --lt-green-dark: #36705D;
    --lt-green-soft: #EAF3EF;
    --lt-gradient: radial-gradient(50% 50% at 50% 50%, #33BD91 0%, #386959 100%);
    --lt-red: #ED5050;
    --lt-blue: #3F7FCA;
    --lt-gold: #EDCB50;

    --lt-ink: #26313A;
    --lt-ink-soft: #5B6B78;
    --lt-ink-faint: #8A98A5;

    --lt-surface: #FFFFFF;
    --lt-tint: #EBF2FA;
    --lt-line: #E3E9F0;

    --lt-radius: 16px;
    --lt-radius-sm: 10px;
    --lt-shadow: 0 4px 24px rgba(38, 49, 58, .07);
    --lt-shadow-lift: 0 12px 32px rgba(38, 49, 58, .12);

    --lt-head: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --lt-body: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

body {
    background: var(--lt-surface);
    color: var(--lt-ink);
    font-family: var(--lt-body);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
}

/*
 * The template sizes headings for a marketing page (h2 is 57px with a negative
 * top margin) and title-cases them, which is wrong in Romanian. Reset both and
 * let each component below set its own scale.
 */
h1, h1 > a, h2, h2 > a, h3, h3 > a,
h4, h4 > a, h5, h5 > a, h6, h6 > a, .heading {
    font-family: var(--lt-head);
    text-transform: none;
    margin-top: 0;
    line-height: 1.25;
    font-size: inherit;
    color: inherit;
}

a {
    color: var(--lt-green);
    text-decoration: none;
    transition: color .18s ease;
}

a:hover {
    color: var(--lt-green-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.lotto-icon {
    flex: none;
    vertical-align: -.15em;
}

.lotto-skip-link {
    position: absolute;
    left: -9999px;
}

.lotto-skip-link:focus {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    padding: 10px 18px;
    background: var(--lt-green);
    color: #fff;
    border-radius: var(--lt-radius-sm);
}

:focus-visible {
    outline: 2px solid var(--lt-green);
    outline-offset: 2px;
}

/* ==========================================================================
   3. Buttons — the template's .cmn-btn plus a ghost variant
   ========================================================================== */

.cmn-btn {
    background: var(--lt-green);
    color: #fff;
    font-family: var(--lt-head);
    font-weight: 700;
    font-size: 15px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--lt-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.cmn-btn:hover {
    background: var(--lt-green-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(68, 140, 116, .28);
}

.cmn-btn--ghost {
    background: transparent;
    color: var(--lt-green);
    box-shadow: inset 0 0 0 1.5px var(--lt-green);
}

.cmn-btn--ghost:hover {
    background: var(--lt-green);
    color: #fff;
}

.cmn-btn--red {
    background: var(--lt-red);
}

.cmn-btn--red:hover {
    background: #d84343;
    box-shadow: 0 6px 18px rgba(237, 80, 80, .28);
}

/* ==========================================================================
   4. Header
   ========================================================================== */

.lotto-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lt-line);
}

.lotto-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 74px;
}

.lotto-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

.lotto-logo-mark img {
    display: block;
    width: 44px;
    height: 44px;
}

/* Stacked two-tone wordmark: Loto sits over Pisi, squared off against the
   mark next to it. */
.lotto-logo-text {
    font-family: var(--lt-head);
    font-size: 20px;
    letter-spacing: -.01em;
    line-height: .96;
}

.lotto-logo-text strong,
.lotto-logo-text em {
    display: block;
    font-style: normal;
    font-weight: 800;
}

.lotto-logo-text strong {
    color: var(--lt-ink);
}

.lotto-logo-text em {
    color: var(--lt-red);
}

.lotto-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
}

.lotto-nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.lotto-nav-link,
.lotto-nav-list a {
    font-family: var(--lt-head);
    font-weight: 500;
    font-size: 15.5px;
    color: var(--lt-ink);
    padding: 9px 14px;
    border-radius: var(--lt-radius-sm);
    display: block;
}

.lotto-nav-link:hover,
.lotto-nav-list a:hover {
    color: var(--lt-green);
    background: var(--lt-green-soft);
}

.lotto-nav-link.is-active,
.lotto-nav-list .current-menu-item > a {
    color: var(--lt-green);
    font-weight: 700;
}

.lotto-nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius-sm);
    color: var(--lt-ink);
    padding: 8px 10px;
    cursor: pointer;
}

/* ==========================================================================
   5. Hero (homepage)
   ========================================================================== */

.lotto-hero {
    position: relative;
    /*
     * The template's banner-bg.png is an 83KB image of soft translucent pink,
     * violet and blue washes over white. Layered radial gradients reproduce it
     * closely for zero bytes, and it was loading on every single page.
     */
    background:
        radial-gradient(60% 70% at 8% 0%,   rgba(229, 126, 222, .22) 0%, rgba(229, 126, 222, 0) 100%),
        radial-gradient(55% 65% at 92% 8%,  rgba(160, 120, 250, .16) 0%, rgba(160, 120, 250, 0) 100%),
        radial-gradient(65% 60% at 18% 100%, rgba(140, 165, 255, .18) 0%, rgba(140, 165, 255, 0) 100%),
        radial-gradient(60% 55% at 85% 95%, rgba(190, 215, 255, .20) 0%, rgba(190, 215, 255, 0) 100%),
        #FBF8FE;
    padding: 68px 0 76px;
    overflow: hidden;
}

.lotto-hero-inner {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 40px;
}

.lotto-hero-eyebrow {
    display: inline-block;
    font-family: var(--lt-head);
    font-weight: 700;
    font-size: 16px;
    color: var(--lt-blue);
    margin-bottom: 14px;
}

.lotto-hero h1 {
    font-family: var(--lt-head);
    font-size: clamp(34px, 4.4vw, 58px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.08;
    color: var(--lt-ink);
    margin-bottom: 18px;
}

.lotto-hero h1 .accent-green { color: var(--lt-green); }
.lotto-hero h1 .accent-red   { color: var(--lt-red); }

.lotto-hero-lead {
    font-size: 18px;
    color: var(--lt-ink-soft);
    max-width: 46ch;
    margin-bottom: 26px;
}

.lotto-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 34px;
}

.lotto-hero-illus img {
    display: block;
    width: 100%;
    max-width: 560px;
    margin-left: auto;
}

.lotto-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 560px;
}

.lotto-stat {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: var(--lt-shadow);
    border-radius: var(--lt-radius-sm);
    padding: 14px 14px 12px;
    backdrop-filter: blur(6px);
}

.lotto-stat strong {
    display: block;
    font-family: var(--lt-head);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--lt-green);
    line-height: 1.15;
}

.lotto-stat span {
    font-size: 12.5px;
    color: var(--lt-ink-soft);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ==========================================================================
   6. Page banner (inner pages)
   ========================================================================== */

.lotto-banner {
    position: relative;
    /*
     * The template's banner-bg.png is an 83KB image of soft translucent pink,
     * violet and blue washes over white. Layered radial gradients reproduce it
     * closely for zero bytes, and it was loading on every single page.
     */
    background:
        radial-gradient(60% 70% at 8% 0%,   rgba(229, 126, 222, .22) 0%, rgba(229, 126, 222, 0) 100%),
        radial-gradient(55% 65% at 92% 8%,  rgba(160, 120, 250, .16) 0%, rgba(160, 120, 250, 0) 100%),
        radial-gradient(65% 60% at 18% 100%, rgba(140, 165, 255, .18) 0%, rgba(140, 165, 255, 0) 100%),
        radial-gradient(60% 55% at 85% 95%, rgba(190, 215, 255, .20) 0%, rgba(190, 215, 255, 0) 100%),
        #FBF8FE;
    overflow: hidden;
}

.lotto-banner-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    min-height: 240px;
    padding: 34px 0;
}

.lotto-banner-title {
    font-family: var(--lt-head);
    font-size: clamp(28px, 3.6vw, 48px);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--lt-green);
    margin-bottom: 10px;
}

.lotto-banner-illus img {
    display: block;
    width: clamp(180px, 26vw, 330px);
    height: auto;
}

.lotto-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 15px;
}

.lotto-breadcrumb li + li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-top: 1.6px solid var(--lt-ink-faint);
    border-right: 1.6px solid var(--lt-ink-faint);
    transform: rotate(45deg);
    vertical-align: middle;
}

.lotto-breadcrumb a { color: var(--lt-ink-soft); }
.lotto-breadcrumb a:hover { color: var(--lt-green); }
.lotto-breadcrumb .is-current { color: var(--lt-red); }

/* ==========================================================================
   7. Sections
   ========================================================================== */

.lotto-section {
    position: relative;
    padding: 60px 0;
}

.lotto-section--tint {
    background: var(--lt-tint);
}

.lotto-section--tight {
    padding: 40px 0;
}

.lotto-section-header {
    max-width: 680px;
    margin: 0 auto 36px;
    text-align: center;
}

.lotto-eyebrow {
    display: inline-block;
    font-family: var(--lt-head);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--lt-gold);
    margin-bottom: 10px;
}

.lotto-section-title {
    font-family: var(--lt-head);
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--lt-ink);
    margin-bottom: 12px;
}

.lotto-section-sub {
    font-size: 16.5px;
    color: var(--lt-ink-soft);
    margin: 0;
}

/* Row heading with an action on the right */
.lotto-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.lotto-row-title {
    font-family: var(--lt-head);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.015em;
    color: var(--lt-ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lotto-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--lt-head);
    font-size: 13px;
    font-weight: 600;
    color: var(--lt-green);
    background: var(--lt-green-soft);
    border-radius: 999px;
    padding: 6px 14px;
}

/* Decorative balls behind a section */
.lotto-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.lotto-shapes + * {
    position: relative;
    z-index: 1;
}

.lotto-shape {
    position: absolute;
    opacity: .5;
}

.lotto-shape--1 { top: 8%;  left: 3%;  width: 70px; }
.lotto-shape--2 { top: 62%; right: 4%; width: 56px; }
.lotto-shape--3 { bottom: 8%; left: 12%; width: 44px; }

/* ==========================================================================
   8. Lottery cards
   ========================================================================== */

.lotto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.lotto-card {
    position: relative;
    background: var(--lt-surface);
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius);
    box-shadow: var(--lt-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.lotto-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--lt-shadow-lift);
    border-color: rgba(68, 140, 116, .35);
}

.lotto-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.lotto-card-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex: none;
    filter: drop-shadow(0 3px 6px rgba(38, 49, 58, .18));
}

.lotto-card-id {
    min-width: 0;
}

.lotto-card-title,
.lotto-card-title > a {
    font-family: var(--lt-head);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
    color: var(--lt-ink);
    margin: 0;
}

.lotto-card-title > a:hover {
    color: var(--lt-green);
}

.lotto-card-type {
    font-size: 13px;
    color: var(--lt-ink-faint);
    font-family: var(--lt-head);
    font-weight: 500;
}

.lotto-card-when {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--lt-ink-soft);
    margin-bottom: 4px;
}

.lotto-card-when .lotto-icon { color: var(--lt-green); }
.lotto-card-dot { color: var(--lt-ink-faint); }

.lotto-card-link {
    margin-top: auto;
    padding-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--lt-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--lt-green);
}

.lotto-card-link:hover {
    gap: 9px;
    color: var(--lt-green-dark);
}

/* ==========================================================================
   9. Balls
   ========================================================================== */

.lotto-balls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    list-style: none;
    margin: 10px 0;
    padding: 0;
}

.lotto-ball {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--lt-line);
    box-shadow: 0 2px 6px rgba(38, 49, 58, .07);
    font-family: var(--lt-head);
    font-weight: 700;
    font-size: 15px;
    color: var(--lt-ink);
}

.lotto-ball--bonus {
    background: var(--lt-gradient);
    border-color: transparent;
    color: #fff;
}

.lotto-balls--sm {
    gap: 6px;
    margin: 8px 0;
}

.lotto-balls--sm .lotto-ball {
    width: 32px;
    height: 32px;
    font-size: 13.5px;
}

.lotto-balls-empty {
    font-size: 14px;
    color: var(--lt-ink-faint);
}

/* ==========================================================================
   10. Panels and tables
   ========================================================================== */

.lotto-panel {
    background: var(--lt-surface);
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius);
    box-shadow: var(--lt-shadow);
    padding: 24px;
    margin-bottom: 22px;
}

.lotto-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.lotto-panel h2,
.lotto-panel h3 {
    font-family: var(--lt-head);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--lt-ink);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.lotto-panel h2 .lotto-icon,
.lotto-panel h3 .lotto-icon {
    color: var(--lt-green);
}

.lotto-panel-sub {
    font-size: 14.5px;
    color: var(--lt-ink-soft);
    margin: 0;
}

.lotto-table-wrap {
    overflow-x: auto;
    margin: 0 -4px;
    padding: 0 4px;
}

.lotto-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    min-width: 460px;
}

.lotto-table th,
.lotto-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--lt-line);
}

.lotto-table th {
    font-family: var(--lt-head);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .045em;
    color: var(--lt-ink-soft);
    background: var(--lt-tint);
    white-space: nowrap;
}

.lotto-table th:first-child { border-radius: var(--lt-radius-sm) 0 0 var(--lt-radius-sm); }
.lotto-table th:last-child  { border-radius: 0 var(--lt-radius-sm) var(--lt-radius-sm) 0; }

.lotto-table tbody tr { transition: background .15s ease; }
.lotto-table tbody tr:hover { background: var(--lt-green-soft); }
.lotto-table tbody tr:last-child td { border-bottom: none; }

.lotto-table td .lotto-balls { margin: 0; }

.lotto-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.lotto-table th.sortable::after {
    content: "⇅";
    margin-left: 5px;
    opacity: .4;
}

.lotto-table th.sortable.sorted-asc::after  { content: "↑"; opacity: 1; color: var(--lt-green); }
.lotto-table th.sortable.sorted-desc::after { content: "↓"; opacity: 1; color: var(--lt-green); }

/* Frequency bar */
.lotto-bar-track {
    display: block;
    min-width: 96px;
    height: 8px;
    background: var(--lt-tint);
    border-radius: 999px;
    overflow: hidden;
}

.lotto-bar {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #33BD91, #386959);
}

/* Number chips */
.lotto-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--lt-line);
    font-family: var(--lt-head);
    font-weight: 700;
    font-size: 14px;
    color: var(--lt-ink);
}

.lotto-chip--hot {
    background: var(--lt-gradient);
    border-color: transparent;
    color: #fff;
}

.lotto-chip--cold {
    background: #EEF4FC;
    border-color: #CFE0F5;
    color: var(--lt-blue);
}

.lotto-chip--gap {
    background: #FDF1F1;
    border-color: #F8D4D4;
    color: var(--lt-red);
}

.lotto-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ==========================================================================
   11. Period tabs / tiles
   ========================================================================== */

.lotto-period-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    background: var(--lt-tint);
    border-radius: 999px;
    padding: 5px;
}

.lotto-period-tab {
    font-family: var(--lt-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--lt-ink-soft);
    padding: 8px 17px;
    border-radius: 999px;
}

.lotto-period-tab:hover { color: var(--lt-green); }

.lotto-period-tab.is-active {
    background: var(--lt-green);
    color: #fff;
    box-shadow: 0 3px 10px rgba(68, 140, 116, .3);
}

.lotto-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.lotto-tile {
    background: var(--lt-surface);
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius);
    box-shadow: var(--lt-shadow);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.lotto-tile-icon {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--lt-green-soft);
    color: var(--lt-green);
}

.lotto-tile strong {
    display: block;
    font-family: var(--lt-head);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--lt-ink);
    line-height: 1.2;
}

.lotto-tile span {
    font-size: 13px;
    color: var(--lt-ink-soft);
}

/* ==========================================================================
   12. Forms
   ========================================================================== */

.lotto-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.lotto-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.lotto-field label {
    font-family: var(--lt-head);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--lt-ink-soft);
}

.lotto-input,
.lotto-select {
    font-family: var(--lt-body);
    background: #fff;
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius-sm);
    padding: 12px 15px;
    font-size: 15.5px;
    color: var(--lt-ink);
    min-width: 220px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.lotto-input:focus,
.lotto-select:focus {
    outline: none;
    border-color: var(--lt-green);
    box-shadow: 0 0 0 3px rgba(68, 140, 116, .16);
}

.lotto-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.lotto-picker .lotto-chip {
    cursor: pointer;
    transition: transform .12s ease, background .12s ease;
}

.lotto-picker .lotto-chip:hover {
    transform: translateY(-2px);
    border-color: var(--lt-green);
}

.lotto-hint {
    font-size: 13.5px;
    color: var(--lt-ink-soft);
    margin: 12px 0 0;
}

/* ==========================================================================
   13. Blog
   ========================================================================== */

.lotto-post-card {
    background: var(--lt-surface);
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius);
    box-shadow: var(--lt-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}

.lotto-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--lt-shadow-lift);
}

.lotto-post-thumb {
    aspect-ratio: 16 / 9;
    background: var(--lt-tint);
    overflow: hidden;
}

.lotto-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lotto-post-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.lotto-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--lt-ink-faint);
    margin-bottom: 10px;
}

.lotto-post-meta a { color: var(--lt-green); }

.lotto-post-cat {
    background: var(--lt-green-soft);
    color: var(--lt-green);
    font-family: var(--lt-head);
    font-weight: 600;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
}

.lotto-post-title,
.lotto-post-title > a {
    font-family: var(--lt-head);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.01em;
    color: var(--lt-ink);
    margin: 0 0 10px;
}

.lotto-post-title > a:hover { color: var(--lt-green); }

.lotto-post-excerpt {
    font-size: 15px;
    color: var(--lt-ink-soft);
    margin-bottom: 16px;
}

.lotto-article {
    background: var(--lt-surface);
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius);
    box-shadow: var(--lt-shadow);
    padding: 36px;
}

.lotto-article-content {
    font-size: 16.5px;
    line-height: 1.78;
    color: #37444F;
}

.lotto-article-content h2 {
    font-size: 25px;
    font-weight: 700;
    margin: 34px 0 12px;
    color: var(--lt-ink);
}

.lotto-article-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 26px 0 10px;
    color: var(--lt-ink);
}

.lotto-article-content p { margin-bottom: 17px; }
.lotto-article-content ul,
.lotto-article-content ol { margin: 0 0 17px 22px; }
.lotto-article-content li { margin-bottom: 7px; }

.lotto-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
    font-size: 15px;
}

.lotto-article-content th,
.lotto-article-content td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--lt-line);
    text-align: left;
}

.lotto-article-content th {
    background: var(--lt-tint);
    font-family: var(--lt-head);
    font-weight: 600;
}

/* ==========================================================================
   14. Pagination, empty states
   ========================================================================== */

.lotto-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.lotto-pagination a,
.lotto-pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border-radius: var(--lt-radius-sm);
    border: 1px solid var(--lt-line);
    background: #fff;
    color: var(--lt-ink);
    font-family: var(--lt-head);
    font-size: 14.5px;
    font-weight: 600;
}

.lotto-pagination a:hover {
    border-color: var(--lt-green);
    color: var(--lt-green);
}

.lotto-pagination .current {
    background: var(--lt-green);
    border-color: var(--lt-green);
    color: #fff;
}

.lotto-empty {
    text-align: center;
    padding: 52px 20px;
    color: var(--lt-ink-soft);
}

.lotto-empty .lotto-icon {
    color: var(--lt-ink-faint);
    margin-bottom: 12px;
}

.lotto-empty h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--lt-ink);
}

.lotto-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 22px;
}

/* ==========================================================================
   15. Footer
   ========================================================================== */

.lotto-footer {
    position: relative;
    background: var(--lt-tint) url('assets/img/footer-bg.webp') bottom center/cover no-repeat;
    border-top: 1px solid var(--lt-line);
    padding: 54px 0 22px;
    margin-top: 60px;
}

.lotto-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: 34px;
}

.lotto-footer .lotto-logo { margin-bottom: 14px; }

.lotto-footer-title {
    font-family: var(--lt-head);
    font-size: 16px;
    font-weight: 700;
    color: var(--lt-ink);
    margin: 0 0 14px;
}

.lotto-footer-text {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--lt-ink-soft);
    margin: 0;
}

.lotto-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13.5px;
    color: var(--lt-ink-soft);
    margin: 14px 0 0;
}

.lotto-footer-note .lotto-icon { color: var(--lt-green); margin-top: 3px; }

.lotto-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lotto-footer-list li { margin-bottom: 9px; }

.lotto-footer-list a {
    font-size: 14.5px;
    color: var(--lt-ink-soft);
}

.lotto-footer-list a:hover { color: var(--lt-green); }

.lotto-footer-bottom {
    border-top: 1px solid var(--lt-line);
    margin-top: 34px;
    padding-top: 20px;
    text-align: center;
}

.lotto-footer-bottom p {
    font-size: 13.5px;
    color: var(--lt-ink-faint);
    margin: 0;
}

/* ==========================================================================
   16. Responsive
   ========================================================================== */

@media (max-width: 1199px) {
    .lotto-footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 991px) {
    .lotto-nav-toggle { display: inline-flex; }

    .lotto-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        background: #fff;
        border-bottom: 1px solid var(--lt-line);
        box-shadow: var(--lt-shadow);
        padding: 14px 20px 20px;
        display: none;
    }

    .lotto-nav.is-open { display: flex; }

    .lotto-nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
    .lotto-nav-cta { justify-content: center; margin-top: 6px; }

    .lotto-hero-inner { grid-template-columns: 1fr; }
    .lotto-hero-illus { order: -1; }
    .lotto-hero-illus img { max-width: 380px; margin: 0 auto; }
    .lotto-hero-stats { max-width: none; }

    .lotto-banner-inner { min-height: 190px; }
    .lotto-banner-illus img { width: clamp(140px, 30vw, 220px); }
}

@media (max-width: 767px) {
    .lotto-hero { padding: 44px 0 52px; }
    .lotto-hero-stats { grid-template-columns: repeat(2, 1fr); }
    .lotto-banner-illus { display: none; }
    .lotto-banner-inner { grid-template-columns: 1fr; min-height: 0; padding: 30px 0; }
    .lotto-section { padding: 44px 0; }
    .lotto-panel { padding: 18px; }
    .lotto-article { padding: 22px; }
    .lotto-footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .lotto-shapes { display: none; }
}

@media (max-width: 575px) {
    .lotto-grid { grid-template-columns: 1fr; }
    .lotto-input, .lotto-select { min-width: 0; width: 100%; }
    .lotto-field { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .lotto-card:hover, .lotto-post-card:hover, .cmn-btn:hover { transform: none; }
}

/* ==========================================================================
   17. Generated lottery balls
   Shared by the header mark, cards and detail pages. Inline SVG, so these
   scale without extra requests; a supplied logo renders as an <img> with the
   same class and picks up the same shadow.
   ========================================================================== */

.lotto-logo-ball {
    flex: none;
    display: block;
    filter: drop-shadow(0 3px 7px rgba(38, 49, 58, .22));
}

img.lotto-logo-ball {
    object-fit: contain;
    border-radius: 50%;
}

/* ==========================================================================
   18. Comments
   WordPress renders the comment form with cols="45" on the textarea, which
   gives it an intrinsic width wider than a phone screen; everything here is
   width-constrained so the page never scrolls sideways.
   ========================================================================== */

.comment-respond,
.comments-area {
    max-width: 100%;
}

.comment-reply-title {
    font-family: var(--lt-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--lt-ink);
    margin-bottom: 6px;
}

.comment-notes,
.comment-form .logged-in-as {
    font-size: 14px;
    color: var(--lt-ink-soft);
    margin-bottom: 16px;
}

.comment-form p {
    margin-bottom: 14px;
}

.comment-form label {
    display: block;
    font-family: var(--lt-head);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--lt-ink-soft);
    margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.comments-area textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    background: #fff;
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius-sm);
    padding: 11px 14px;
    font-family: var(--lt-body);
    font-size: 15.5px;
    color: var(--lt-ink);
}

.comment-form textarea {
    min-height: 130px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--lt-green);
    box-shadow: 0 0 0 3px rgba(68, 140, 116, .16);
}

.comment-form .form-submit input[type="submit"] {
    background: var(--lt-green);
    color: #fff;
    font-family: var(--lt-head);
    font-weight: 700;
    font-size: 15px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--lt-radius-sm);
    cursor: pointer;
}

.comment-form .form-submit input[type="submit"]:hover {
    background: var(--lt-green-dark);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 26px;
}

.comment-list li {
    border-bottom: 1px solid var(--lt-line);
    padding: 16px 0;
}

.comment-list .comment-meta {
    font-size: 13px;
    color: var(--lt-ink-faint);
    margin-bottom: 6px;
}

/* Any embedded media in article content stays inside its column. */
.lotto-article-content img,
.lotto-article-content iframe,
.lotto-article-content video {
    max-width: 100%;
    height: auto;
}

.lotto-article-content pre {
    overflow-x: auto;
    max-width: 100%;
}
