@charset "utf-8";

/* IrelandElection.com - Modern Dashboard Theme
   Base Palette: Slate, Zinc, and vibrant Party Accents
*/

:root {
    /* Core Backgrounds */
    --bg-main: #020617;        /* Slate 950 */
    --bg-card: #1e293b;        /* Slate 800 */
    --bg-header: #334155;      /* Slate 700 */
    
    /* Text Colors */
    --text-primary: #f8fafc;   /* Slate 50 */
    --text-secondary: #94a3b8; /* Slate 400 */
    --text-muted: #64748b;    /* Slate 500 */
    
    /* Functional Colors */
    --accent-blue: #3b82f6;
    --success-green: #4ade80;
    --error-red: #f87171;
    --female-rose: #fb7185;

    /* Party Colors - Standardized */
    --color-ff: #66BB66;
    --color-fg: #004494;
    --color-sf: #00685E;
    --color-lab: #CC0000;
}

/* Reset & Global */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* Sticky footer layout */
#maintablecontent {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#maintablecontent > .container {
    flex: 1 0 auto;
}

/* Default link treatment for slate theme */
a {
    color: #cbd5e1;
    text-decoration: underline;
    text-decoration-color: rgba(203, 213, 225, 0.35);
    text-underline-offset: 2px;
    transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

a:hover,
a:focus {
    color: #f8fafc;
    text-decoration-color: rgba(248, 250, 252, 0.65);
}

a:visited {
    color: #b6c2d1;
}

a:focus-visible {
    outline: 2px solid rgba(148, 163, 184, 0.6);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Typography */
.candname {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.refconstit {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.025em;
    color: var(--accent-blue);
    margin-bottom: 10px;
}

thead {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--bg-header);
}

.percent {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
}

/* Data Bars & Visuals */
.bar {
    margin-top: 3px;
    height: 12px;
    display: inline-block;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.bar2 {
    float: left;
}

.bartemp {
    margin-top: 0px;
    height: 12px;
    display: inline-block;
    background: var(--bg-header);
}

.votes {
    vertical-align: middle;
    margin-top: 4px;
    padding-left: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

.transfers {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* Differential Indicators */
.posdiff, .negdiff {
    padding-top: 12px !important;
    font-size: 11px;
    font-weight: 700;
}

.posdiff {
    color: var(--success-green);
}

.negdiff {
    color: var(--error-red);
}

/* Layout Utilities */
.after-box {
    clear: left;
}

/* Button UI - The "Flashy" Look 
   Using modern gradients and subtle glows
*/



.btn-general {
    background: linear-gradient(180deg, #13a147 0%, #14532d 100%);
    box-shadow: 0 4px 14px rgba(21, 128, 61, 0.22);
}

.btn-bye {
    background: linear-gradient(180deg, #13a147 0%, #14532d 100%);
    box-shadow: 0 4px 14px rgba(21, 128, 61, 0.22);
}

.btn-local {
    background: linear-gradient(180deg, #2563eb 0%, #1e3a8a 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.20);
}

.btn-seanad {
    background: linear-gradient(180deg, #a16207 0%, #713f12 100%);
    box-shadow: 0 4px 14px rgba(161, 98, 7, 0.18);
}

.btn-euro {
    background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22);
}

.btn-pres {
    background: linear-gradient(180deg, #7c3aed 0%, #4c1d95 100%);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.22);
}

.btn-ref {
    background: linear-gradient(180deg, #0f766e 0%, #134e4a 100%);
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.20);
}


.election-subnav {
    margin: 0 0 18px;
}

.election-subnav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.election-subnav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.55rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.8);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.82);
    color: var(--text-secondary) !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.18);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.election-subnav__link:hover,
.election-subnav__link:focus {
    background: rgba(51, 65, 85, 0.95);
    border-color: rgba(96, 165, 250, 0.55);
    color: var(--text-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
}

.election-subnav__link.active,
.election-subnav__link.active:hover,
.election-subnav__link.active:focus {
    background: rgba(71, 85, 105, 0.95);
    border-color: rgba(148, 163, 184, 0.5);
    color: #f8fafc !important;
    box-shadow: none;
}

.election-toolbar {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.24);
}

.election-toolbar__form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
}

.election-toolbar__controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 720px;
    flex-wrap: nowrap;
    min-width: 0;
}

.election-toolbar__group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 0;
    min-width: 0;
}

.election-toolbar__label {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.election-toolbar__select {
    flex: 1 1 0;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.48);
    color: var(--text-primary);
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.election-toolbar__select--wide {
    min-width: 220px;
}

.election-toolbar__select:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.election-toolbar__button {
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(51, 65, 85, 0.88);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.election-toolbar__button:hover,
.election-toolbar__button:focus {
    background: rgba(71, 85, 105, 0.96);
    border-color: rgba(96, 165, 250, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.2);
}

.election-toolbar__stats {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    margin-left: auto;
    flex-wrap: nowrap;
}

.election-toolbar__stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
}

.election-toolbar__stat-label {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.election-toolbar__stat-value {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.page-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    margin: 0 0 18px;
}

.page-header h1 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.page-header h1 a {
    color: #ffffff;
    text-decoration: none;
}

.page-header h1 a:hover {
    color: #94a3b8;
    text-decoration: none;
}

.well {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.2);
}

.table {
    --bs-table-bg: rgba(15, 23, 42, 0.9);
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: rgba(148, 163, 184, 0.2);
    --bs-table-striped-bg: rgba(30, 41, 59, 0.58);
    --bs-table-striped-color: var(--text-primary);
    --bs-table-hover-bg: rgba(51, 65, 85, 0.62);
    --bs-table-hover-color: var(--text-primary);
}

.table > :not(caption) > * > * {
    background-color: transparent !important;
    color: var(--text-primary);
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

.table thead th {
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 12px;
}

.table a {
    color: #60a5fa;
}

.table a:hover,
.table a:focus {
    color: #93c5fd;
}

/* Candidates & Interaction */
a.female {
    color: var(--female-rose) !important;
    text-decoration: none;
    font-weight: 500;
}

a.female:hover {
    text-decoration: underline;
}

/* Candidate photo - circular */
.cand-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    border: 2px solid rgba(148, 163, 184, 0.2);
}

/* Elected candidate row */
.table tbody tr.elected-row > td {
    background-color: rgba(30, 41, 59, 0.55) !important;
}

/* Candidate link colour - white */
.table a, .candname a {
    color: var(--text-primary) !important;
    text-decoration: underline;
    text-decoration-color: rgba(148, 163, 184, 0.35);
    text-underline-offset: 2px;
}
.table a:hover, .candname a:hover {
    color: #fff !important;
    text-decoration-color: rgba(148, 163, 184, 0.75);
}

/* Seat badge */
.table .badge.bg-secondary {
    background-color: rgba(51, 65, 85, 0.85) !important;
    color: var(--text-primary);
    font-size: 12px;
    padding: 4px 9px;
    border-radius: 999px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .refconstit {
        font-size: 16px;
    }
    .btn-base {
        width: 100%;
        margin-bottom: 8px;
        display: block;
    }

    .election-subnav__list {
        gap: 8px;
    }

    .election-subnav__link {
        width: 100%;
    }

    .election-toolbar {
        padding: 12px;
    }

    .election-toolbar__form,
    .election-toolbar__controls,
    .election-toolbar__group,
    .election-toolbar__stats {
        width: 100%;
    }

    .election-toolbar__form,
    .election-toolbar__controls,
    .election-toolbar__stats {
        flex-wrap: wrap;
    }

    .election-toolbar__group {
        flex-wrap: wrap;
    }

    .election-toolbar__label {
        width: 100%;
    }

    .election-toolbar__button,
    .election-toolbar__select,
    .election-toolbar__select--wide,
    .election-toolbar__stat {
        width: 100%;
    }

    .election-toolbar__stats {
        margin-left: 0;
    }
}