@font-face {
    font-family: "Inter";
    src: url("../../assets/fonts/Inter-Variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Public Sans";
    src: url("../../assets/fonts/PublicSans-Variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("../../assets/fonts/Manrope-Variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-width: 0;
    background: transparent;
}

body {
    padding: 4px;
    color: var(--widget-color);
    font-family: inherit;
    text-rendering: optimizeLegibility;
}

body.widget-font-inter {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

body.widget-font-public-sans {
    font-family: "Public Sans", "Segoe UI", Arial, sans-serif;
}

body.widget-font-manrope {
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
}

body.widget-font-system {
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.widget-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--widget-accent) 44%, transparent);
    border-radius: 22px;
    background: var(--widget-background);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.widget-frame-square .widget-card {
    border-radius: 0;
}

.widget-frame-none body,
.widget-frame-none {
    padding: 0;
}

.widget-frame-none .widget-card {
    padding-inline: 20px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.widget-topline,
.widget-heading-row,
.widget-source {
    display: flex;
    align-items: center;
}

.widget-topline {
    gap: 9px;
    margin-bottom: 16px;
    color: color-mix(in srgb, var(--widget-color) 72%, transparent);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.025em;
}

.widget-mode {
    min-width: 0;
    overflow-wrap: anywhere;
}

.widget-brand {
    position: relative;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--widget-accent) 58%, transparent);
    border-radius: 8px 8px 8px 2px;
    color: var(--widget-accent);
    font-size: 15px;
    font-weight: 850;
    line-height: 1;
}

.widget-brand i {
    position: absolute;
    right: -4px;
    bottom: 4px;
    width: 14px;
    height: 3px;
    transform: rotate(-45deg);
    background: #e89a45;
}

.widget-brand span {
    position: relative;
    z-index: 1;
}

.widget-heading-row {
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.widget-status,
.widget-date,
.widget-empty p,
.widget-election h1 {
    margin: 0;
}

.widget-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    color: var(--widget-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.widget-status > span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 12px color-mix(in srgb, var(--widget-accent) 60%, transparent);
}

.widget-status-open {
    color: color-mix(in srgb, var(--widget-color) 66%, transparent);
}

.widget-election h1,
.widget-empty h1 {
    margin: 0;
    color: var(--widget-color);
    font-size: clamp(18px, 4.5vw, 25px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.widget-date {
    flex: 0 0 auto;
    color: var(--widget-color);
    font-size: 12px;
    font-weight: 720;
    line-height: 1.35;
    text-align: right;
}

.widget-date span {
    color: color-mix(in srgb, var(--widget-color) 68%, transparent);
    font-weight: 600;
}

.widget-countdown {
    margin-top: 18px;
}

.widget-countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.widget-countdown[data-seconds="0"] .widget-countdown-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.widget-countdown-grid > div {
    min-width: 0;
    padding: 11px 8px 9px;
    border: 1px solid color-mix(in srgb, var(--widget-accent) 24%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--widget-accent) 7%, transparent);
    text-align: center;
}

.widget-countdown-grid strong,
.widget-countdown-grid span {
    display: block;
}

.widget-countdown-grid strong {
    overflow: hidden;
    color: var(--widget-accent);
    font-size: clamp(24px, 8vw, 40px);
    font-variant-numeric: tabular-nums;
    font-weight: 780;
    line-height: 1;
    letter-spacing: -0.05em;
    text-overflow: clip;
}

.widget-countdown-grid span {
    margin-top: 5px;
    color: color-mix(in srgb, var(--widget-color) 64%, transparent);
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.widget-empty {
    min-height: 110px;
    display: grid;
    align-content: center;
}

.widget-empty p:not(.widget-status) {
    margin-top: 9px;
    color: color-mix(in srgb, var(--widget-color) 72%, transparent);
    font-size: 13px;
    line-height: 1.45;
}

.widget-empty p strong {
    color: var(--widget-color);
}

.widget-source {
    justify-content: flex-end;
    margin-top: 17px;
    padding-top: 11px;
    border-top: 1px solid color-mix(in srgb, var(--widget-color) 14%, transparent);
}

.widget-source a {
    min-height: 36px;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    color: color-mix(in srgb, var(--widget-color) 74%, transparent);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.widget-source strong {
    margin-left: 4px;
    color: var(--widget-color);
    font-weight: 800;
}

.widget-source a:hover,
.widget-source a:focus-visible {
    color: var(--widget-accent);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.widget-source a:focus-visible {
    outline: 2px solid var(--widget-accent);
    outline-offset: 3px;
    border-radius: 3px;
}

.widget-layout-compact .widget-card {
    padding-block: 14px;
}

.widget-layout-compact .widget-topline {
    margin-bottom: 10px;
}

.widget-layout-compact .widget-heading-row {
    align-items: center;
}

.widget-layout-compact .widget-status {
    display: none;
}

.widget-layout-compact .widget-election h1,
.widget-layout-compact .widget-empty h1 {
    font-size: clamp(16px, 4vw, 20px);
}

.widget-layout-compact .widget-countdown {
    margin-top: 11px;
}

.widget-layout-compact .widget-countdown-grid > div {
    padding-block: 7px 6px;
}

.widget-layout-compact .widget-countdown-grid strong {
    font-size: clamp(21px, 7vw, 31px);
}

.widget-layout-compact .widget-source {
    margin-top: 10px;
    padding-top: 8px;
}

.widget-layout-compact .widget-source a {
    min-height: 30px;
    font-size: 11.5px;
}

.widget-layout-compact .widget-empty {
    min-height: 72px;
}

@media (max-width: 430px) {
    .widget-card {
        padding: 16px;
    }

    .widget-frame-none .widget-card {
        padding-inline: 16px;
    }

    .widget-layout-compact .widget-card {
        padding-block: 14px;
    }

    .widget-heading-row {
        display: block;
    }

    .widget-date {
        margin-top: 7px;
        text-align: left;
    }

    .widget-countdown-grid {
        gap: 5px;
    }

    .widget-countdown-grid > div {
        padding-inline: 4px;
    }
}

@media (max-width: 260px) {
    .widget-countdown-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .widget-countdown[data-seconds="0"] .widget-countdown-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 300px) {
    .widget-countdown-grid strong {
        font-size: 20px;
    }

    .widget-countdown-grid span {
        font-size: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}
