/* ==========================================
   CAST MEMBERS PORTAL
   ELECTION RESULTS
========================================== */

.cast-results-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 30px auto;
}


/* ==========================================
   PAGE HEADER
========================================== */

.cast-results-wrapper > h2 {
    margin: 0 0 8px;

    color: var(--cast-text);

    font-size: 28px;
    font-weight: 800;

    line-height: 1.2;
}


.cast-results-wrapper > p {
    margin: 0 0 24px;

    color: var(--cast-muted);

    font-size: 14px;
}


/* ==========================================
   POSITION RESULT CARD
========================================== */

.cast-result-position {
    padding: 24px;

    margin-bottom: 22px;

    background: #ffffff;

    border: 1px solid var(--cast-border);

    border-radius: 18px;

    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.05);
}


.cast-result-position h3 {
    margin: 0 0 18px;

    color: var(--cast-text);

    font-size: 21px;
    font-weight: 800;
}


/* ==========================================
   CANDIDATE RESULT ROW
========================================== */

.cast-result-candidate {
    display: flex !important;

    align-items: center;

    gap: 16px !important;

    padding: 15px 0 !important;

    border-bottom:
        1px solid var(--cast-border) !important;
}


.cast-result-candidate:last-child {
    border-bottom: 0 !important;
}


/* ==========================================
   CANDIDATE PHOTO
========================================== */

.cast-result-candidate img {
    width: 72px !important;
    height: 72px !important;

    min-width: 72px;

    object-fit: cover;

    border-radius: 14px;

    background: var(--cast-bg);
}


/* ==========================================
   CANDIDATE DETAILS
========================================== */

.cast-result-candidate > div {
    flex: 1;

    min-width: 0;

    color: var(--cast-muted);

    font-size: 13px;

    line-height: 1.6;
}


.cast-result-candidate strong {
    color: var(--cast-text);

    font-size: 16px;
    font-weight: 800;
}


/* ==========================================
   ELECTED LABEL
========================================== */

.cast-result-candidate strong:last-child {
    display: inline-block;

    margin-top: 6px;

    padding: 5px 9px;

    border-radius: 999px;

    background:
        var(--cast-success-bg);

    color:
        var(--cast-success);

    font-size: 11px;
    font-weight: 800;
}


/* ==========================================
   RESULT BAR
========================================== */

.cast-result-bar {
    position: relative;

    height: 8px;

    margin-top: 9px;

    overflow: hidden;

    border-radius: 999px;

    background: var(--cast-bg);
}


.cast-result-bar-fill {
    height: 100%;

    border-radius: 999px;

    background:
        var(--cast-primary);

    transition: width 0.4s ease;
}


/* ==========================================
   RESULT SUMMARY
========================================== */

.cast-results-summary {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;

    margin-bottom: 24px;
}


.cast-results-summary-card {
    padding: 18px;

    background: #ffffff;

    border:
        1px solid var(--cast-border);

    border-radius: 15px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.04);
}


.cast-results-summary-card span {
    display: block;

    color:
        var(--cast-muted);

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}


.cast-results-summary-card strong {
    display: block;

    margin-top: 4px;

    color:
        var(--cast-text);

    font-size: 24px;
    font-weight: 800;
}


/* ==========================================
   ADMIN-LIKE RESULT TABLE
========================================== */

.cast-results-table {
    width: 100%;

    border-collapse: collapse;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid var(--cast-border);

    border-radius: 14px;
}


.cast-results-table thead {
    background: var(--cast-bg);
}


.cast-results-table th {
    padding: 13px 14px;

    color: var(--cast-muted);

    font-size: 11px;
    font-weight: 800;

    text-align: left;

    text-transform: uppercase;

    letter-spacing: 0.4px;

    border-bottom:
        1px solid var(--cast-border);
}


.cast-results-table td {
    padding: 14px;

    color: var(--cast-text);

    font-size: 13px;

    border-bottom:
        1px solid var(--cast-border);
}


.cast-results-table tbody tr:last-child td {
    border-bottom: 0;
}


/* ==========================================
   NO RESULTS / WAITING STATE
========================================== */

.cast-results-empty {
    padding: 40px 25px;

    background: #ffffff;

    border:
        1px dashed var(--cast-border);

    border-radius: 16px;

    text-align: center;

    color: var(--cast-muted);
}


.cast-results-empty h3 {
    margin: 0 0 7px;

    color: var(--cast-text);

    font-size: 18px;
}


.cast-results-empty p {
    margin: 0;

    font-size: 13px;
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 768px) {

    .cast-results-wrapper {
        margin: 15px auto;
    }


    .cast-results-wrapper > h2 {
        font-size: 23px;
    }


    .cast-results-summary {
        grid-template-columns: 1fr;
    }


    .cast-result-position {
        padding: 18px;

        border-radius: 15px;
    }

}


@media (max-width: 520px) {

    .cast-result-candidate {
        gap: 12px !important;
    }


    .cast-result-candidate img {
        width: 58px !important;
        height: 58px !important;

        min-width: 58px;

        border-radius: 11px;
    }


    .cast-result-candidate strong {
        font-size: 14px;
    }


    .cast-result-candidate > div {
        font-size: 11px;
    }


    .cast-result-position h3 {
        font-size: 18px;
    }

}