﻿/* =========================================================
   GEDIAN SPORTS - PUBLIC SHOW VOTINGS
   ========================================================= */

.show-votings-page {
    --sv-green: #5B8C3B;
    --sv-green-dark: #416d29;
    --sv-green-soft: #edf5e9;
    --sv-navy: #102a43;
    --sv-text: #33434c;
    --sv-muted: #7e8a91;
    --sv-line: #dfe6dc;
    --sv-bg: #f6f8f5;
    --sv-white: #ffffff;
    --sv-blue: #4b739c;
    --sv-purple: #75568b;
    --sv-warning: #a3781e;
    --sv-danger: #a44a4a;
    min-height: 72vh;
    padding: 18px 0 44px;
    background: radial-gradient(circle at 0 0,rgba(91,140,59,.065),transparent 28rem), var(--sv-bg);
    color: var(--sv-text);
    font-family: "Tajawal", sans-serif;
}

.show-votings-shell {
    width: min(1440px,calc(100% - 20px));
    margin: 0 auto;
}


/* =========================================================
   HERO
   ========================================================= */

.sv-hero {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--sv-line);
    border-radius: 18px;
    background: radial-gradient(circle at 8% 0,rgba(91,140,59,.12),transparent 23rem), linear-gradient(135deg,#fff,#fbfdf9);
    box-shadow: 0 9px 26px rgba(16,42,67,.045);
}

.sv-hero-copy {
    display: grid;
    grid-template-columns: 52px minmax(0,1fr);
    gap: 11px;
    align-items: center;
}

.sv-hero-mark {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid #d6e3d1;
    border-radius: 15px;
    background: var(--sv-green-soft);
    font-size: 1.15rem;
}

.sv-eyebrow {
    display: block;
    color: var(--sv-green-dark);
    font-size: .45rem;
    font-weight: 900;
    letter-spacing: .07em;
    direction: ltr;
    text-align: right;
}

.sv-hero h1 {
    margin: 3px 0 0;
    color: var(--sv-navy);
    font-size: clamp(1.2rem,3vw,1.85rem);
    font-weight: 800;
}

.sv-hero p {
    max-width: 760px;
    margin: 5px 0 0;
    color: #77847d;
    font-size: .70rem;
    line-height: 1.8;
}

.sv-hero-stats {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 7px;
}

    .sv-hero-stats article {
        min-width: 0;
        padding: 9px;
        border: 1px solid #e1e8df;
        border-radius: 10px;
        background: rgba(255,255,255,.84);
    }

    .sv-hero-stats span,
    .sv-hero-stats strong {
        display: block;
    }

    .sv-hero-stats span {
        color: #89958e;
        font-size: .35rem;
    }

    .sv-hero-stats strong {
        margin-top: 2px;
        color: var(--sv-navy);
        font-size: .85rem;
        font-weight: 800;
    }


/* =========================================================
   LOAD ERROR
   ========================================================= */

.sv-load-error {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #ebcccc;
    border-radius: 10px;
    background: #fff8f8;
    color: #9f4747;
}

    .sv-load-error > span {
        display: grid;
        width: 32px;
        height: 32px;
        place-items: center;
        border-radius: 50%;
        background: #f8dfdf;
        font-weight: 900;
    }

    .sv-load-error strong {
        display: block;
        font-size: .50rem;
        font-weight: 800;
    }

    .sv-load-error p {
        margin: 2px 0 0;
        font-size: .40rem;
    }


/* =========================================================
   CONTROLS
   ========================================================= */

.sv-controls {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 9px;
    border: 1px solid var(--sv-line);
    border-radius: 11px;
    background: #fff;
}

.sv-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sv-tab {
    display: inline-flex;
    min-height: 33px;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid #dce4d9;
    border-radius: 999px;
    background: #fff;
    color: #647169;
    font-family: inherit;
    font-size: .42rem;
    font-weight: 700;
    cursor: pointer;
}

    .sv-tab span {
        display: inline-grid;
        min-width: 18px;
        height: 18px;
        place-items: center;
        padding: 0 4px;
        border-radius: 999px;
        background: #eff2ee;
        color: #738078;
        font-size: .30rem;
    }

    .sv-tab.is-active {
        border-color: var(--sv-green);
        background: var(--sv-green);
        color: #fff;
    }

        .sv-tab.is-active span {
            background: rgba(255,255,255,.16);
            color: #fff;
        }

.sv-search {
    display: grid;
    grid-template-columns: 25px minmax(0,1fr);
    gap: 4px;
    align-items: center;
    min-height: 36px;
    padding: 0 8px;
    border: 1px solid #dbe3d8;
    border-radius: 8px;
    background: #fafcfa;
}

    .sv-search span {
        color: #849088;
        font-size: .50rem;
    }

    .sv-search input {
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: #536158;
        font-family: inherit;
        font-size: .43rem;
    }


/* =========================================================
   SECTIONS
   ========================================================= */

.sv-section {
    margin-top: 11px;
}

.sv-section-head {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 3px 7px;
}

.sv-section-kicker {
    display: block;
    color: var(--sv-green-dark);
    font-size: .38rem;
    font-weight: 900;
    letter-spacing: .06em;
    direction: ltr;
    text-align: right;
}

.sv-section-head h2 {
    margin: 2px 0 0;
    color: var(--sv-navy);
    font-size: .82rem;
    font-weight: 800;
}

.sv-section-head p {
    margin: 2px 0 0;
    color: #8a958e;
    font-size: .39rem;
}

.sv-section-count {
    display: grid;
    min-width: 35px;
    height: 35px;
    place-items: center;
    padding: 0 7px;
    border-radius: 10px;
    background: var(--sv-green-soft);
    color: var(--sv-green-dark);
    font-size: .54rem;
    font-weight: 800;
}

    .sv-section-count.is-completed {
        background: #edf1f4;
        color: #61707a;
    }


/* =========================================================
   VOTING LIST / ROW
   ========================================================= */

.sv-voting-list {
    display: grid;
    gap: 6px;
}

.sv-voting-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px,2fr) minmax(72px,.45fr) minmax(80px,.52fr) minmax(145px,.8fr) 28px;
    gap: 9px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--sv-line);
    border-radius: 11px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(16,42,67,.018);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background-color .15s ease;
}

    .sv-voting-row:hover,
    .sv-voting-row:focus-visible {
        border-color: #a9ca9b;
        background: #fbfdf9;
        color: inherit;
        outline: 0;
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(16,42,67,.055);
    }

    .sv-voting-row.is-current {
        border-right: 3px solid var(--sv-green);
    }

        .sv-voting-row.is-current.is-ending-soon {
            border-right-color: #bd8721;
        }

    .sv-voting-row.is-featured {
        background: linear-gradient(135deg,#fff,#fbfdf8);
    }

    .sv-voting-row.is-completed {
        border-right: 3px solid #92a09a;
    }

.sv-voting-leading {
    display: grid;
    grid-template-columns: 46px minmax(0,1fr);
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.sv-voting-symbol {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 13px;
    background: var(--sv-green-soft);
    font-size: .94rem;
}

    .sv-voting-symbol.is-completed {
        background: #edf1ef;
        color: #61716a;
        font-size: .66rem;
        font-weight: 900;
    }

.sv-voting-title {
    min-width: 0;
}

.sv-voting-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

    .sv-voting-badges b {
        display: inline-flex;
        min-height: 18px;
        align-items: center;
        gap: 3px;
        padding: 2px 5px;
        border-radius: 999px;
        background: #eff2ee;
        color: #68756d;
        font-size: .28rem;
        font-weight: 800;
    }

        .sv-voting-badges b i {
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: currentColor;
        }

    .sv-voting-badges .is-open {
        background: #eaf7e5;
        color: #3f812e;
    }

    .sv-voting-badges .is-suspended {
        background: #fff4df;
        color: var(--sv-warning);
    }

    .sv-voting-badges .is-closed {
        background: #eef1f2;
        color: #66747c;
    }

    .sv-voting-badges .is-audit {
        background: #f4eef9;
        color: var(--sv-purple);
    }

    .sv-voting-badges .is-finalized {
        background: #ece9f5;
        color: #654f80;
    }

    .sv-voting-badges .is-featured {
        background: #fff2be;
        color: #806714;
    }

    .sv-voting-badges .is-winner {
        background: #fff2c9;
        color: #7a6119;
    }

.sv-voting-title > strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--sv-navy);
    font-size: .57rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sv-voting-title > small {
    display: block;
    margin-top: 1px;
    overflow: hidden;
    color: #939ca1;
    font-family: Arial,sans-serif;
    font-size: .32rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sv-voting-award {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #6f7c74;
    font-size: .34rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .sv-voting-award em {
        margin-left: 3px;
        color: #9aa39e;
        font-style: normal;
    }

    .sv-voting-award i {
        color: #87938b;
        font-style: normal;
    }

.sv-voting-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 4px 0 0;
    color: #8a958e;
    font-size: .32rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.sv-voting-metric,
.sv-voting-time {
    display: grid;
    min-width: 0;
    align-content: center;
}

    .sv-voting-metric small,
    .sv-voting-time small {
        color: #929c96;
        font-size: .29rem;
    }

    .sv-voting-metric strong,
    .sv-voting-time strong {
        margin-top: 1px;
        color: #4e5e55;
        font-size: .47rem;
        font-weight: 800;
    }

    .sv-voting-metric em,
    .sv-voting-time em {
        margin-top: 1px;
        color: #9ba39e;
        font-size: .27rem;
        font-style: normal;
    }

    .sv-voting-metric .is-hidden-stat {
        color: #84908a;
    }

.sv-voting-arrow {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: #f0f5ed;
    color: var(--sv-green-dark);
    font-size: .46rem;
    font-weight: 900;
    transition: transform .15s ease, background-color .15s ease, color .15s ease;
}

.sv-voting-row:hover .sv-voting-arrow {
    background: var(--sv-green);
    color: #fff;
    transform: translateX(-2px);
}


/* =========================================================
   EMPTY STATES
   ========================================================= */

.sv-empty,
.sv-search-empty {
    padding: 28px 12px;
    border: 1px dashed #d8e1d5;
    border-radius: 11px;
    background: #fff;
    color: #89958e;
    text-align: center;
}

    .sv-empty > span,
    .sv-empty > strong,
    .sv-empty > small,
    .sv-search-empty > span,
    .sv-search-empty > strong,
    .sv-search-empty > small {
        display: block;
    }

    .sv-empty > span,
    .sv-search-empty > span {
        font-size: 1.25rem;
    }

    .sv-empty > strong,
    .sv-search-empty > strong {
        margin-top: 4px;
        color: var(--sv-navy);
        font-size: .55rem;
        font-weight: 800;
    }

    .sv-empty > small,
    .sv-search-empty > small {
        margin-top: 3px;
        font-size: .36rem;
    }

.sv-search-empty {
    margin-top: 12px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (min-width: 720px) {

    .sv-hero {
        grid-template-columns: minmax(0,1fr) 340px;
        align-items: center;
    }

    .sv-controls {
        grid-template-columns: auto minmax(300px,1fr);
        align-items: center;
    }

    .sv-search {
        max-width: 520px;
        justify-self: end;
    }
}


@media (max-width: 900px) {

    .sv-voting-row {
        grid-template-columns: minmax(250px,1.9fr) minmax(70px,.5fr) minmax(130px,.8fr) 26px;
    }

        .sv-voting-row > .sv-voting-metric:nth-of-type(3) {
            display: none;
        }
}


@media (max-width: 650px) {

    .show-votings-page {
        padding-top: 10px;
    }

    .show-votings-shell {
        width: min(100% - 10px,1440px);
    }

    .sv-hero {
        padding: 13px;
    }

    .sv-hero-copy {
        grid-template-columns: 43px minmax(0,1fr);
    }

    .sv-hero-mark {
        width: 43px;
        height: 43px;
        border-radius: 12px;
        font-size: .95rem;
    }

    .sv-hero p {
        font-size: .62rem;
    }

    .sv-controls {
        padding: 7px;
    }

    .sv-tabs {
        display: grid;
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

    .sv-tab {
        justify-content: center;
        padding-inline: 6px;
        font-size: .36rem;
    }

    .sv-voting-row {
        grid-template-columns: minmax(0,1fr) 25px;
        gap: 7px;
    }

    .sv-voting-metric,
    .sv-voting-time {
        display: none;
    }

    .sv-voting-leading {
        grid-template-columns: 39px minmax(0,1fr);
    }

    .sv-voting-symbol {
        width: 39px;
        height: 39px;
        border-radius: 11px;
        font-size: .78rem;
    }

    .sv-voting-title > strong {
        white-space: normal;
    }

    .sv-voting-description {
        display: none;
    }

    .sv-section-head p {
        display: none;
    }
}
