/* Custom styling for Mikro Seçim */

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

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.modal-open {
    overflow: hidden;
}

.topbar {
    top: 0.875rem;
    left: 50%;
    right: auto;
    width: min(calc(100% - 2rem), 96rem);
    transform: translateX(-50%);
    min-height: 4.5rem;
    display: grid;
    grid-template-columns: minmax(11.5rem, auto) minmax(0, 1fr) minmax(15rem, 17rem);
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 1.15rem;
}

.brand-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.mobile-controls-toggle {
    display: none;
}

.brand-logo {
    width: 3.25rem;
    height: 2.75rem;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 0.85rem;
    box-shadow: 0 6px 16px rgba(227, 0, 27, 0.2);
}

.brand-copy h1 {
    font-size: 1rem;
}

.brand-copy p {
    margin-top: 0.2rem;
    font-size: 0.75rem;
}

#controlBar {
    justify-content: center;
    gap: 0.5rem;
    min-width: 0;
}

.control-field {
    flex: 0 1 auto;
}

.labeled-control {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.control-caption {
    display: block;
    padding-left: 0.15rem;
    color: #64748B;
    font-size: 0.75rem;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.control-select,
#searchInput {
    height: 2.35rem;
    background: #F8FAFC;
    color: #1E293B;
    font-size: 0.8125rem;
    font-weight: 650;
    border: 1px solid #CBD5E1;
    border-radius: 0.8rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.control-select {
    padding: 0 2.1rem 0 0.85rem;
}

.control-select:hover,
#searchInput:hover {
    background: #F1F5F9;
    border-color: #94A3B8;
}

.control-select:focus,
#searchInput:focus {
    background: #FFFFFF;
    outline: 2px solid rgba(227, 0, 27, 0.28);
    outline-offset: 1px;
}

.control-select:disabled {
    opacity: 0.5;
}

#electionSelect {
    width: 13rem;
}

#yearSelect {
    width: 5.75rem;
}

#provinceSelect {
    width: 9.75rem;
}

#districtSelect {
    width: 9rem;
}

.segmented-control {
    min-height: 2.35rem;
    padding: 0.22rem;
    gap: 0.12rem;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    border-radius: 0.85rem;
}

.segmented-control button {
    min-height: 1.8rem;
    padding: 0 0.62rem;
    border-radius: 0.65rem;
    font-size: 0.8125rem;
    white-space: nowrap;
}

#searchBar {
    width: 100%;
}

#searchInput {
    padding: 0 0.9rem 0 2.25rem;
}

#map {
    position: absolute;
    inset: 0;
}

.feature-tray {
    top: calc(var(--topbar-bottom, 5.8rem) + 0.65rem);
    left: max(1rem, calc((100vw - 96rem) / 2));
    display: grid;
    grid-template-columns: repeat(2, minmax(17rem, 1fr));
    gap: 0.55rem;
    width: min(43rem, calc(100vw - 2rem));
}

.soon-feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    min-height: 4.15rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.8);
    border-radius: 0.95rem;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.95));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    color: #334155;
    text-align: left;
    backdrop-filter: blur(12px);
}

.soon-feature:disabled {
    cursor: not-allowed;
    opacity: 1;
}

.soon-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.75rem;
    background: #E2E8F0;
    color: #475569;
}

.soon-lock svg {
    width: 1.05rem;
    height: 1.05rem;
}

.soon-copy {
    min-width: 0;
}

.soon-copy strong,
.soon-copy small {
    display: block;
}

.soon-copy strong {
    overflow: hidden;
    color: #0F172A;
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.soon-copy small {
    margin-top: 0.22rem;
    overflow: hidden;
    color: #64748B;
    font-size: 0.67rem;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.soon-badge {
    padding: 0.28rem 0.48rem;
    border: 1px solid rgba(227, 0, 27, 0.18);
    border-radius: 9999px;
    background: #FFF1F2;
    color: #BE123C;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.legend-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.55rem;
    color: #64748B;
}

.legend-toggle:hover,
.legend-toggle:focus-visible {
    background: #F1F5F9;
    color: #0F172A;
    outline: 2px solid #E3001B;
    outline-offset: 1px;
}

.legend-toggle svg {
    width: 0.95rem;
    height: 0.95rem;
    transition: transform 160ms ease;
}

#legendPanel.is-collapsed #legendItems {
    display: none;
}

#legendPanel.is-collapsed .legend-toggle svg {
    transform: rotate(-90deg);
}

#legendPanel.is-collapsed > div:first-child {
    margin-bottom: 0;
}

.follow-banner {
    right: 6rem;
    bottom: 1.5rem;
    left: 19rem;
    display: grid;
    grid-template-columns: minmax(17rem, 0.9fr) minmax(27rem, 1.4fr);
    align-items: center;
    gap: 1rem;
    width: min(58rem, calc(100vw - 25rem));
    min-height: 5.75rem;
    padding: 0.75rem 0.9rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 1.15rem;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.97), rgba(255, 241, 242, 0.96));
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(227, 0, 27, 0.08);
    backdrop-filter: blur(14px);
}

.follow-banner::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.28rem;
    background: linear-gradient(#FF334D, #C40020);
    content: '';
}

.follow-pitch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.follow-pitch > img {
    width: 3.4rem;
    height: 3.4rem;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 0.9rem;
    box-shadow: 0 8px 18px rgba(227, 0, 27, 0.2);
}

.follow-pitch strong,
.follow-pitch p,
.follow-eyebrow {
    display: block;
}

.follow-eyebrow {
    margin-bottom: 0.15rem;
    color: #E3001B;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.follow-pitch strong {
    color: #0F172A;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.15;
}

.follow-pitch p {
    margin-top: 0.25rem;
    color: #64748B;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}

.follow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.48rem;
}

.follow-actions a,
.follow-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0 0.58rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.88);
    color: #475569;
    font-size: 0.78rem;
    font-weight: 750;
    text-decoration: none;
}

.follow-actions a,
.follow-actions .feedback-trigger {
    border-color: rgba(227, 0, 27, 0.25);
    color: #BE123C;
}

.follow-actions a:hover,
.follow-actions button:hover,
.follow-actions a:focus-visible,
.follow-actions button:focus-visible {
    border-color: rgba(227, 0, 27, 0.45);
    background: #FFF1F2;
    color: #BE123C;
    outline: 2px solid rgba(227, 0, 27, 0.32);
    outline-offset: 1px;
}

.follow-actions svg {
    width: 0.9rem;
    height: 0.9rem;
}

.follow-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

.follow-link {
    display: grid;
    place-items: center;
    gap: 0.32rem;
    min-width: 0;
    min-height: 4rem;
    padding: 0.48rem 0.3rem;
    border: 1px solid #E2E8F0;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.follow-link img {
    width: 1.45rem;
    height: 1.45rem;
}

.follow-link span {
    overflow: hidden;
    max-width: 100%;
    font-size: 0.68rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.follow-link:hover,
.follow-link:focus-visible {
    z-index: 1;
    border-color: rgba(227, 0, 27, 0.38);
    box-shadow: 0 9px 18px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
    outline: none;
}

.disclaimer-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(9px);
}

.disclaimer-modal.hidden {
    display: none;
}

.disclaimer-card {
    width: min(46rem, 100%);
    max-height: min(46rem, calc(100vh - 2rem));
    padding: 1.4rem;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1.3rem;
    background: #FFFFFF;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.38);
}

.disclaimer-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E2E8F0;
}

.disclaimer-brand img {
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 0.95rem;
    box-shadow: 0 8px 20px rgba(227, 0, 27, 0.2);
}

.disclaimer-brand span {
    color: #E3001B;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.disclaimer-brand h2 {
    margin-top: 0.25rem;
    color: #0F172A;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.2;
}

.disclaimer-content {
    padding: 1rem 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
    user-select: text;
}

.disclaimer-content p + p,
.disclaimer-content ul + p {
    margin-top: 0.8rem;
}

.disclaimer-content section {
    padding: 0.85rem 0;
    border-bottom: 1px solid #E2E8F0;
}

.disclaimer-content section:first-child {
    padding-top: 0;
}

.disclaimer-content h3 {
    margin-bottom: 0.35rem;
    color: #0F172A;
    font-size: 0.92rem;
    font-weight: 900;
}

.disclaimer-content .notice-footnote {
    margin-top: 0.85rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #FED7AA;
    border-radius: 0.75rem;
    background: #FFF7ED;
    color: #9A3412;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.5;
}

.disclaimer-content strong {
    color: #0F172A;
}

.disclaimer-content ul {
    display: grid;
    gap: 0.55rem;
    margin: 0.85rem 0 0;
    padding-left: 1.2rem;
    list-style: disc;
}

.disclaimer-content .privacy-summary {
    padding: 0.9rem;
    border: 1px solid #FECDD3;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, #FFF1F2, #FFFFFF);
}

.disclaimer-content .privacy-summary ul {
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.disclaimer-content .privacy-summary li::marker {
    color: #E3001B;
}

.disclaimer-content .policy-date {
    color: #64748B;
    font-size: 0.8rem;
    font-weight: 700;
}

.disclaimer-content a {
    color: #BE123C;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.inline-feedback-trigger {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: #BE123C;
    font: inherit;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.inline-feedback-trigger:hover,
.inline-feedback-trigger:focus-visible {
    color: #9F1239;
    outline: 2px solid rgba(227, 0, 27, 0.24);
    outline-offset: 2px;
}

.disclaimer-accept {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 3.15rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #E3001B, #BE123C);
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 850;
    box-shadow: 0 10px 22px rgba(190, 18, 60, 0.24);
}

.disclaimer-accept:hover,
.disclaimer-accept:focus-visible {
    background: linear-gradient(135deg, #C90019, #9F1239);
    outline: 3px solid rgba(227, 0, 27, 0.28);
    outline-offset: 2px;
}

.disclaimer-accept svg {
    width: 1.1rem;
    height: 1.1rem;
}

.about-modal {
    position: fixed;
    inset: 0;
    z-index: 88;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.about-modal.hidden {
    display: none;
}

.about-card {
    width: min(43rem, 100%);
    max-height: min(48rem, calc(100vh - 2rem));
    padding: 1.35rem;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 1.3rem;
    background: #FFFFFF;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.38);
}

.about-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E2E8F0;
}

.about-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.about-brand img {
    width: 3.4rem;
    height: 3.4rem;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 0.9rem;
    box-shadow: 0 8px 20px rgba(227, 0, 27, 0.2);
}

.about-brand span,
.about-contact > div:first-child > span {
    display: block;
    color: #E3001B;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-brand h2 {
    margin-top: 0.2rem;
    color: #0F172A;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.2;
}

.about-head > button {
    display: grid;
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    background: #F8FAFC;
    color: #475569;
}

.about-head > button:hover,
.about-head > button:focus-visible {
    border-color: #FDA4AF;
    background: #FFF1F2;
    color: #BE123C;
    outline: 2px solid rgba(227, 0, 27, 0.2);
    outline-offset: 2px;
}

.about-head svg {
    width: 1.15rem;
    height: 1.15rem;
}

.about-content {
    padding-top: 1rem;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.58;
    user-select: text;
}

.about-content > p strong {
    color: #0F172A;
}

.about-values {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.about-values section {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.82rem;
    border: 1px solid #E2E8F0;
    border-radius: 0.85rem;
    background: #F8FAFC;
}

.about-values section > svg {
    width: 2.35rem;
    height: 2.35rem;
    padding: 0.58rem;
    border-radius: 0.72rem;
    background: #FFF1F2;
    color: #BE123C;
}

.about-values h3 {
    color: #0F172A;
    font-size: 0.88rem;
    font-weight: 900;
}

.about-values p {
    margin-top: 0.12rem;
    font-size: 0.79rem;
    line-height: 1.45;
}

.about-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.9rem;
    border: 1px solid #FECDD3;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, #FFF1F2, #FFFFFF);
}

.about-contact > div:first-child > strong {
    display: block;
    margin-top: 0.18rem;
    color: #334155;
    font-size: 0.8rem;
    line-height: 1.4;
}

.about-contact-links {
    display: grid;
    gap: 0.42rem;
}

.about-contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.35rem;
    padding: 0 0.7rem;
    border: 1px solid #FDA4AF;
    border-radius: 0.7rem;
    background: #FFFFFF;
    color: #BE123C;
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.about-contact-links a:hover,
.about-contact-links a:focus-visible {
    background: #FFE4E6;
    outline: 2px solid rgba(227, 0, 27, 0.2);
    outline-offset: 2px;
}

.about-contact-links svg {
    width: 0.95rem;
    height: 0.95rem;
}

.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
}

.feedback-modal.hidden {
    display: none;
}

.feedback-card {
    width: min(40rem, 100%);
    max-height: min(48rem, calc(100vh - 2rem));
    padding: 1.35rem;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 1.3rem;
    background: #FFFFFF;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.38);
}

.feedback-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E2E8F0;
}

.feedback-head > div > span {
    color: #E3001B;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.feedback-head h2 {
    margin-top: 0.2rem;
    color: #0F172A;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.2;
}

.feedback-head p {
    margin-top: 0.3rem;
    color: #64748B;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
}

.feedback-head > button {
    display: grid;
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    background: #F8FAFC;
    color: #475569;
}

.feedback-head > button:hover,
.feedback-head > button:focus-visible {
    border-color: #FDA4AF;
    background: #FFF1F2;
    color: #BE123C;
    outline: 2px solid rgba(227, 0, 27, 0.2);
    outline-offset: 2px;
}

.feedback-head svg {
    width: 1.15rem;
    height: 1.15rem;
}

#feedbackForm {
    display: grid;
    gap: 0.9rem;
    padding-top: 1rem;
}

#feedbackForm label {
    display: grid;
    gap: 0.38rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
}

#feedbackForm label small {
    color: #94A3B8;
    font-size: 0.72rem;
    font-weight: 650;
}

#feedbackForm input,
#feedbackForm select,
#feedbackForm textarea {
    width: 100%;
    min-height: 2.85rem;
    padding: 0.68rem 0.78rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.75rem;
    background: #F8FAFC;
    color: #0F172A;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
}

#feedbackForm input:focus,
#feedbackForm select:focus,
#feedbackForm textarea:focus {
    border-color: #FB7185;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.13);
}

#feedbackForm textarea {
    min-height: 8.5rem;
    line-height: 1.45;
    resize: vertical;
}

.feedback-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.feedback-honey {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.feedback-note {
    color: #64748B;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.45;
}

#feedbackForm .feedback-consent {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    align-items: start;
    gap: 0.65rem;
    padding: 0.75rem 0.8rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.75rem;
    background: #F8FAFC;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.45;
}

#feedbackForm .feedback-consent input {
    width: 1.1rem;
    height: 1.1rem;
    min-height: 0;
    margin-top: 0.1rem;
    padding: 0;
    accent-color: #E3001B;
}

.feedback-status {
    padding: 0.7rem 0.8rem;
    border-radius: 0.7rem;
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1.4;
}

.feedback-status[data-kind="success"] {
    border: 1px solid #A7F3D0;
    background: #ECFDF5;
    color: #047857;
}

.feedback-status[data-kind="error"] {
    border: 1px solid #FECDD3;
    background: #FFF1F2;
    color: #BE123C;
}

.feedback-buttons {
    display: grid;
    grid-template-columns: minmax(7rem, 0.4fr) minmax(10rem, 0.6fr);
    gap: 0.65rem;
    margin-top: 0.1rem;
}

.feedback-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.8rem;
    background: #FFFFFF;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 850;
}

.feedback-buttons button[type="submit"] {
    border-color: transparent;
    background: linear-gradient(135deg, #E3001B, #BE123C);
    color: #FFFFFF;
    box-shadow: 0 10px 22px rgba(190, 18, 60, 0.2);
}

.feedback-buttons button:hover,
.feedback-buttons button:focus-visible {
    outline: 3px solid rgba(227, 0, 27, 0.2);
    outline-offset: 2px;
}

.feedback-buttons button[type="submit"]:hover,
.feedback-buttons button[type="submit"]:focus-visible {
    background: linear-gradient(135deg, #C90019, #9F1239);
}

.feedback-buttons button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.feedback-buttons svg {
    width: 1rem;
    height: 1rem;
}

.follow-link:focus-visible {
    outline: 2px solid #E3001B;
    outline-offset: 2px;
}


.maplibregl-canvas {
    outline: none;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Level & Mode Buttons */
.level-btn.active, .mode-btn.active {
    background-color: #FFFFFF;
    color: #E3001B;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.level-btn:not(.active), .mode-btn:not(.active) {
    color: #64748B;
}

.level-btn:not(.active):hover, .mode-btn:not(.active):hover {
    color: #1E293B;
}

.level-btn:disabled, .mode-btn:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.level-btn:focus-visible, .mode-btn:focus-visible, #logoBtn:focus-visible,
#closeSidebarBtn:focus-visible, #searchResults button:focus-visible {
    outline: 2px solid #E3001B;
    outline-offset: 2px;
}

/* MapLibre Controls Overrides */
.maplibregl-ctrl-group {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    border-radius: 12px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    overflow: hidden;
}

#chartEmpty:not(.hidden) {
    display: flex;
}

#appToast {
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 180ms ease, transform 180ms ease;
    color: white;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

#appToast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

#appToast[data-kind="error"] {
    background: rgba(190, 18, 60, 0.97);
}

#appToast[data-kind="warning"] {
    background: rgba(146, 64, 14, 0.97);
}

@media (max-width: 1700px) {
    .topbar {
        width: calc(100% - 1.5rem);
        grid-template-columns: auto minmax(0, 1fr);
    }

    #controlBar {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    #controlBar > * {
        flex: 0 0 auto;
    }

    #searchBar {
        grid-column: 1 / -1;
        width: 100%;
    }

    #sidebar {
        top: 10.25rem;
    }

    .feature-tray {
        left: 0.75rem;
    }

}

@media (max-width: 1250px) {
    .follow-banner {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        width: auto;
    }

    body > .absolute.bottom-6.left-6,
    .maplibregl-ctrl-bottom-right {
        bottom: 8rem;
    }

    #scopeStatus {
        bottom: 7.25rem;
    }
}

@media (max-width: 720px) {
    .topbar {
        top: 0.5rem !important;
        left: 50% !important;
        right: auto !important;
        width: calc(100% - 1rem);
        transform: translateX(-50%);
        padding: 0.65rem !important;
        border-radius: 1rem !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.6rem;
    }

    .brand-logo {
        width: 2.8rem;
        height: 2.45rem;
    }

    .brand-copy h1 {
        font-size: 0.92rem;
    }

    .mobile-controls-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        min-height: 2.75rem;
        padding: 0 0.75rem;
        border: 1px solid #CBD5E1;
        border-radius: 0.8rem;
        background: #F8FAFC;
        color: #334155;
        font-size: 0.82rem;
        font-weight: 800;
    }

    .mobile-controls-toggle svg {
        width: 1rem;
        height: 1rem;
    }

    #topBar.is-expanded .mobile-controls-toggle {
        border-color: rgba(227, 0, 27, 0.35);
        background: #FFF1F2;
        color: #BE123C;
    }

    #topBar:not(.is-expanded) #controlBar {
        display: none !important;
    }

    #controlBar {
        grid-column: 1 / -1;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
        overflow: visible;
        padding: 0.25rem 0 0.1rem;
    }

    #controlBar > * {
        min-width: 0;
    }

    #controlBar .control-select,
    #yearSelect,
    #electionSelect,
    #provinceSelect,
    #districtSelect {
        width: 100%;
    }

    #controlBar .segmented-control {
        width: 100%;
    }

    #controlBar .segmented-control button {
        flex: 1 1 0;
        min-height: 2.35rem;
        padding: 0 0.35rem;
        font-size: 0.74rem;
    }

    .control-select,
    #searchInput {
        height: 2.75rem;
        font-size: 1rem;
    }

    #searchBar {
        grid-column: 1 / -1;
        width: 100%;
    }

    .feature-tray {
        right: 0.5rem;
        left: 0.5rem;
        grid-template-columns: 1fr;
        width: auto;
    }

    .soon-feature {
        min-height: 3.65rem;
    }

    .soon-copy strong {
        white-space: normal;
    }

    .soon-copy small {
        display: none;
    }

    #sidebar {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        width: auto;
        z-index: 45;
    }


    #scopeStatus {
        bottom: 9rem;
        white-space: nowrap;
    }

    .maplibregl-ctrl-bottom-right {
        bottom: 9rem;
    }

    body > .absolute.bottom-6.left-6 {
        left: 0.75rem;
        bottom: 9rem;
        max-width: 13rem;
    }

    #legendPanel {
        padding: 0.65rem;
    }

    #legendPanel #legendTitle {
        font-size: 0.66rem;
    }

    .follow-banner {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        min-height: auto;
        padding: 0.65rem 0.75rem;
    }

    .follow-pitch > img {
        width: 2.7rem;
        height: 2.7rem;
    }

    .follow-pitch strong {
        font-size: 0.85rem;
    }

    .follow-pitch p {
        display: none;
    }

    .follow-actions {
        margin-top: 0.35rem;
    }

    .follow-actions a,
    .follow-actions button {
        min-height: 1.8rem;
        padding: 0 0.45rem;
        font-size: 0.68rem;
    }

    .follow-link {
        min-height: 3.1rem;
        padding: 0.35rem 0.2rem;
    }

    .follow-link img {
        width: 1.2rem;
        height: 1.2rem;
    }

    .follow-link span {
        font-size: 0.58rem;
    }

    .disclaimer-modal {
        align-items: flex-end;
        padding: 0.5rem;
    }

    .disclaimer-card {
        max-height: calc(100vh - 1rem);
        padding: 1rem;
        border-radius: 1.15rem;
    }

    .disclaimer-brand img {
        width: 3rem;
        height: 3rem;
    }

    .disclaimer-brand h2 {
        font-size: 1rem;
    }

    .disclaimer-content {
        font-size: 0.86rem;
        line-height: 1.5;
    }

    .feedback-modal {
        align-items: flex-end;
        padding: 0.5rem;
    }

    .about-modal {
        align-items: flex-end;
        padding: 0.5rem;
    }

    .about-card {
        max-height: calc(100vh - 1rem);
        padding: 1rem;
        border-radius: 1.15rem;
    }

    .about-brand img {
        width: 3rem;
        height: 3rem;
    }

    .about-brand h2 {
        font-size: 1.05rem;
    }

    .about-content {
        font-size: 0.84rem;
    }

    .about-contact {
        grid-template-columns: 1fr;
    }

    .about-contact-links a {
        justify-content: center;
    }

    .feedback-card {
        max-height: calc(100vh - 1rem);
        padding: 1rem;
        border-radius: 1.15rem;
    }

    .feedback-head h2 {
        font-size: 1.08rem;
    }

    .feedback-two-columns {
        grid-template-columns: 1fr;
    }

    #feedbackForm textarea {
        min-height: 7rem;
    }

    .feedback-buttons {
        grid-template-columns: 0.42fr 0.58fr;
    }
}

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