/* Shared, calm input styling across the Sunfyre experience. */
html[data-ui-theme="sunfyre"] :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
    select,
    textarea
) {
    min-height: 46px;
    padding: 10px 14px;
    color: #f5f6fa;
    background-color: #11151d;
    border: 1px solid rgba(174, 186, 207, .18);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 2px 8px rgba(0,0,0,.12);
    font: inherit;
    line-height: 1.35;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

html[data-ui-theme="sunfyre"] :is(input, select, textarea)::placeholder {
    color: #778195;
    opacity: 1;
}

html[data-ui-theme="sunfyre"] :is(input, select, textarea):hover:not(:disabled):not([readonly]) {
    border-color: rgba(174, 186, 207, .34);
    background-color: #151a24;
}

html[data-ui-theme="sunfyre"] :is(input, select, textarea):focus {
    color: #fff;
    background-color: #151a24;
    border-color: #b45cf2;
    box-shadow: 0 0 0 3px rgba(180, 92, 242, .16), inset 0 1px 0 rgba(255,255,255,.025);
    outline: 0;
}

html[data-ui-theme="sunfyre"] :is(input, select, textarea):disabled,
html[data-ui-theme="sunfyre"] :is(input, select, textarea)[readonly] {
    color: #9ba4b4;
    background-color: #10131a;
    opacity: .72;
    cursor: not-allowed;
}

html[data-ui-theme="sunfyre"] select,
html[data-ui-theme="sunfyre"] select option {
    color: #f5f6fa;
    background-color: #11151d;
}

html[data-ui-theme="sunfyre"] textarea {
    min-height: 112px;
    resize: vertical;
}

html[data-ui-theme="sunfyre"] :is(.input-group, .stake-input-group) > :is(input, select, textarea, .form-control, .stake-control) {
    min-width: 0;
    min-height: 46px;
    background-color: #11151d !important;
    border-color: rgba(174, 186, 207, .18) !important;
    border-radius: 0 12px 12px 0 !important;
    box-shadow: none;
}

html[data-ui-theme="sunfyre"] :is(.input-group, .stake-input-group) > :is(.input-group-text, .btn) {
    min-height: 46px;
    color: #aeb8c9;
    background: #11151d !important;
    border: 1px solid rgba(174, 186, 207, .18) !important;
    border-radius: 12px 0 0 12px !important;
}

html[data-ui-theme="sunfyre"] :is(.input-group, .stake-input-group):focus-within {
    border-radius: 13px;
    box-shadow: 0 0 0 3px rgba(180, 92, 242, .16);
}

html[data-ui-theme="sunfyre"] :is(.input-group, .stake-input-group):focus-within > :is(.input-group-text, .btn, .form-control, .stake-control) {
    border-color: rgba(180, 92, 242, .72) !important;
}

html[data-ui-theme="sunfyre"] :is(input[type="checkbox"], input[type="radio"], input[type="range"], input[type="file"]) {
    accent-color: #b45cf2;
}

html[data-ui-theme="sunfyre"] :is(.form-label, label) {
    color: #c5ccda;
}

html[data-ui-theme="sunfyre"] .is-invalid,
html[data-ui-theme="sunfyre"] .was-validated :invalid {
    border-color: #f07183 !important;
    box-shadow: 0 0 0 3px rgba(240, 113, 131, .12);
}

/* Treat each draw as a distinct round, with clear status and browsing states. */
html[data-ui-theme="sunfyre"] .lottery-fixture-card {
    overflow: hidden;
    background: linear-gradient(145deg, rgba(25, 29, 39, .98), rgba(16, 18, 25, .98));
    border: 1px solid rgba(173, 184, 203, .13);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.16);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

html[data-ui-theme="sunfyre"] .lottery-fixture-card:hover,
html[data-ui-theme="sunfyre"] .lottery-fixture-card.active {
    border-color: rgba(180, 92, 242, .44);
    box-shadow: 0 12px 30px rgba(0,0,0,.24), 0 0 0 1px rgba(180,92,242,.08);
}

html[data-ui-theme="sunfyre"] .fixture-header {
    min-height: 108px;
    cursor: pointer;
    transition: background-color .18s ease;
}

html[data-ui-theme="sunfyre"] .fixture-header:hover,
html[data-ui-theme="sunfyre"] .fixture-header[aria-expanded="true"] {
    background-color: rgba(255,255,255,.025);
}

html[data-ui-theme="sunfyre"] .fixture-logo-badge,
html[data-ui-theme="sunfyre"] .draw-league-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(180,92,242,.2);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(180,92,242,.14), rgba(255,255,255,.025));
}

html[data-ui-theme="sunfyre"] .fixture-logo-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

html[data-ui-theme="sunfyre"] .fixture-title {
    font-size: clamp(.92rem, 1.4vw, 1.05rem);
    letter-spacing: -.015em;
}

html[data-ui-theme="sunfyre"] .fixture-subtitle {
    margin-top: 3px;
    font-size: .72rem;
    letter-spacing: .025em;
}

html[data-ui-theme="sunfyre"] .fixture-countdown {
    padding: 7px 10px;
    border: 1px solid rgba(174,186,207,.13);
    border-radius: 10px;
    background: rgba(7,10,15,.45);
    font-size: .76rem;
}

html[data-ui-theme="sunfyre"] .fixture-win-badge {
    border: 1px solid rgba(85,207,155,.18);
    border-radius: 9px;
    background: rgba(85,207,155,.07);
}

html[data-ui-theme="sunfyre"] .fixture-league-filter {
    scrollbar-width: thin;
    scrollbar-color: rgba(180,92,242,.38) transparent;
}

html[data-ui-theme="sunfyre"] .fixture-league-filter .league-filter-btn,
html[data-ui-theme="sunfyre"] .draw-filter-scroll .btn {
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid rgba(174,186,207,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.035);
    color: #c8cfdd;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

html[data-ui-theme="sunfyre"] .fixture-league-filter .league-filter-btn:hover,
html[data-ui-theme="sunfyre"] .fixture-league-filter .league-filter-btn.active,
html[data-ui-theme="sunfyre"] .draw-filter-scroll .btn-stake-solid {
    border-color: rgba(180,92,242,.58);
    background: rgba(180,92,242,.14);
    color: #f4e8ff;
}

html[data-ui-theme="sunfyre"] .fixture-league-filter .league-filter-btn img {
    flex: 0 0 auto;
}

html[data-ui-theme="sunfyre"] .lottery-accordion-container {
    display: grid;
    gap: 10px;
}

html[data-ui-theme="sunfyre"] .lottery-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(43px, 1fr));
    gap: 9px;
}

html[data-ui-theme="sunfyre"] .lottery-ball-btn {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid rgba(174,186,207,.17);
    border-radius: 13px;
    background: linear-gradient(145deg, #202633, #151a23);
    color: #e6eaf2;
    font-weight: 650;
    transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

html[data-ui-theme="sunfyre"] .lottery-ball-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(180,92,242,.6);
    background: #292236;
}

html[data-ui-theme="sunfyre"] .lottery-ball-btn.active,
html[data-ui-theme="sunfyre"] .lottery-ball-btn.selected,
html[data-ui-theme="sunfyre"] .lottery-ball-btn[aria-pressed="true"] {
    border-color: #d19aff;
    background: linear-gradient(145deg, #bd71ef, #8e43ce);
    color: #fff;
    box-shadow: 0 5px 14px rgba(145,68,202,.28), inset 0 1px 0 rgba(255,255,255,.2);
}

html[data-ui-theme="sunfyre"] .selected-balls-tray {
    min-height: 64px;
    border-color: rgba(180,92,242,.2) !important;
    background: linear-gradient(100deg, rgba(180,92,242,.075), rgba(12,15,21,.78)) !important;
}

html[data-ui-theme="sunfyre"] .stake-picker-card,
html[data-ui-theme="sunfyre"] .stake-match-card,
html[data-ui-theme="sunfyre"] .lottery-results-wrapper .stake-card,
html[data-ui-theme="sunfyre"] .user-tickets-wrapper .stake-card {
    border: 1px solid rgba(174,186,207,.13);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(22,26,35,.98), rgba(14,16,22,.98));
    box-shadow: 0 12px 34px rgba(0,0,0,.16);
}

html[data-ui-theme="sunfyre"] .stake-bottom-betslip-drawer {
    border: 1px solid rgba(174,186,207,.17);
    border-radius: 22px 22px 0 0;
    background: #11141b;
    box-shadow: 0 -18px 55px rgba(0,0,0,.4);
}

html[data-ui-theme="sunfyre"] .floating-lotto-dock {
    padding: 8px;
    border: 1px solid rgba(174,186,207,.18);
    border-radius: 18px;
    background: rgba(15,18,25,.94);
    box-shadow: 0 12px 36px rgba(0,0,0,.4);
    backdrop-filter: blur(18px);
}

html[data-ui-theme="sunfyre"] .lottery-results-wrapper .stake-control {
    min-height: 46px;
}

html[data-ui-theme="sunfyre"] .lottery-results-wrapper .table,
html[data-ui-theme="sunfyre"] .user-tickets-wrapper .table {
    --bs-table-bg: transparent;
    --bs-table-color: #dce1eb;
    margin-bottom: 0;
}

html[data-ui-theme="sunfyre"] :is(.lottery-results-wrapper, .user-tickets-wrapper) .table > :not(caption) > * > * {
    padding: 14px 12px;
    border-bottom-color: rgba(174,186,207,.1);
}

html[data-ui-theme="sunfyre"] .ticket-ball-pill {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(180,92,242,.25);
    border-radius: 50%;
    background: rgba(180,92,242,.12);
    color: #e8d1fb;
    font-size: .78rem;
    font-weight: 700;
}

html[data-ui-theme="sunfyre"] .ticket-ball-pill.matched {
    border-color: rgba(85,207,155,.5);
    background: rgba(85,207,155,.16);
    color: #8be2bb;
}

@media (max-width: 575.98px) {
    html[data-ui-theme="sunfyre"] :is(
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
        select,
        textarea
    ) { min-height: 44px; padding: 9px 12px; border-radius: 11px; }

    html[data-ui-theme="sunfyre"] .fixture-header { min-height: 100px; padding: 12px !important; }
    html[data-ui-theme="sunfyre"] .fixture-countdown { padding: 6px 7px; font-size: .68rem; }
    html[data-ui-theme="sunfyre"] .fixture-win-badge { padding: 5px 7px !important; }
    html[data-ui-theme="sunfyre"] .lottery-compact-grid { grid-template-columns: repeat(auto-fill, minmax(37px, 1fr)); gap: 7px; }
    html[data-ui-theme="sunfyre"] .floating-lotto-dock { border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    html[data-ui-theme="sunfyre"] :is(.lottery-fixture-card, .lottery-ball-btn, .fixture-league-filter .league-filter-btn) { transition: none; }
}

/* Flat focus states: keep fields easy to locate without the old neon glow. */
html[data-ui-theme="sunfyre"] :is(input, select, textarea, .form-control, .form--control, .plain-control, .stake-control):focus {
    border-color: #c9a0ff !important;
    outline: 0 !important;
    box-shadow: none !important;
}

html[data-ui-theme="sunfyre"] :is(input, select, textarea, .form-control, .form--control, .plain-control, .stake-control):focus-visible {
    outline: 2px solid rgba(201,160,255,.72) !important;
    outline-offset: 1px !important;
}

html[data-ui-theme="sunfyre"] :is(.input-group, .plain-input-group, .stake-input-group):focus-within {
    outline: 0 !important;
    border-color: #c9a0ff !important;
    box-shadow: none !important;
    background: #11151d !important;
}

html[data-ui-theme="sunfyre"] :is(.plain-input-group, .stake-input-group, .login-form .input-group) {
    min-height: 46px;
    overflow: hidden;
    border: 1px solid rgba(174,186,207,.2) !important;
    border-radius: 12px !important;
    background: #11151d !important;
    box-shadow: none !important;
}

html[data-ui-theme="sunfyre"] :is(.plain-input-group, .stake-input-group, .login-form .input-group) > .input-group-text {
    flex: 0 0 46px;
    justify-content: center;
    padding: 0 10px !important;
    color: #99a5b8 !important;
    background: transparent !important;
    border: 0 !important;
}

html[data-ui-theme="sunfyre"] :is(.plain-input-group, .stake-input-group, .login-form .input-group) > :is(input, select, textarea, .form-control, .plain-control, .stake-control) {
    min-height: 44px;
    min-width: 0;
    padding-inline: 4px 14px;
    color: #f5f6fa !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html[data-ui-theme="sunfyre"] :is(.plain-input-group, .stake-input-group, .login-form .input-group) > :is(input, select, textarea, .form-control, .plain-control, .stake-control):focus {
    outline: 0 !important;
    box-shadow: none !important;
}

html[data-ui-theme="sunfyre"] :is(.auth-plain-wrapper, .login-area-inner) {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

html[data-ui-theme="sunfyre"] .auth-plain-wrapper {
    max-width: 430px !important;
}

html[data-ui-theme="sunfyre"] .auth-plain-wrapper .auth-header {
    margin-bottom: 28px;
}

@media (max-width: 575.98px) {
    html[data-ui-theme="sunfyre"] :is(.plain-input-group, .stake-input-group, .login-form .input-group) > .input-group-text {
        flex-basis: 42px;
    }
}
