﻿/* =========================================================
   GEDIAN SPORTS - PUBLIC SHOW REFEREES
   Compact public directory aligned with ShowPlayers/ShowClubs
   ========================================================= */

.public-referees-page {
    --green: #5B8C3B;
    --green-dark: #426b2d;
    --green-soft: #eef6e9;
    --navy: #17283b;
    --text: #425149;
    --muted: #7c8881;
    --border: #e0e7dd;
    --bg: #f6f8f4;
    --yellow: #e5b72c;
    --yellow-soft: #fff6d7;
    min-height: 100vh;
    padding: 11px 0 52px;
    background: radial-gradient( circle at 5% 0%, rgba(229,183,44,.05), transparent 22rem), linear-gradient( 180deg, #fcfdfb 0%, var(--bg) 100%);
    color: var(--text);
    font-family: "Tajawal", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

    .public-referees-page .container {
        max-width: 1320px;
    }


/* =========================================================
   Registration strip
   ========================================================= */

.referee-register-strip {
    min-height: 52px;
    padding: 7px 10px 7px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e5e1cf;
    border-radius: 11px;
    background: linear-gradient( 90deg, #fffaf0, #fcfdf9);
}

    .referee-register-strip > div {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.referee-register-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #fff;
    font-size: 1rem;
    box-shadow: 0 2px 7px rgba(73,59,13,.06);
}

.referee-register-strip strong {
    color: var(--navy);
    font-size: .88rem;
    font-weight: 900;
}

.referee-register-strip > div > span:last-child {
    overflow: hidden;
    color: #7c796d;
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referee-register-strip > a {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 8px;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 900;
}

    .referee-register-strip > a:hover {
        background: var(--green-dark);
    }


/* =========================================================
   Search
   ========================================================= */

.referees-search-bar {
    margin-top: 8px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15,23,42,.025);
}

.referees-search-form {
    display: grid;
    grid-template-columns: minmax(190px,1.5fr) minmax(120px,.85fr) minmax(160px,1.05fr) minmax(130px,.85fr) minmax(120px,.8fr) minmax(135px,.85fr) auto auto;
    align-items: center;
    gap: 6px;
}

.referee-search-control {
    min-width: 0;
    height: 39px;
    display: flex;
    align-items: center;
    border: 1px solid #dfe5dc;
    border-radius: 8px;
    background: #fbfcfa;
}

.referee-search-text-control {
    padding-inline: 9px 3px;
    gap: 6px;
}

    .referee-search-text-control > span {
        flex: 0 0 auto;
        font-size: .82rem;
    }

.referee-search-control input,
.referee-search-control select {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #4c5a52;
    font-family: inherit;
    font-size: .77rem;
}

.referee-search-control select {
    padding-inline: 8px 25px;
}

.referee-search-control input::placeholder {
    color: #9ba49f;
}

.referees-search-button,
.referees-search-reset {
    height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 900;
}

.referees-search-button {
    min-width: 61px;
    padding: 6px 11px;
    border: 0;
    background: var(--green);
    color: #fff;
    font-size: .78rem;
}

.referees-search-reset {
    width: 39px;
    border: 1px solid #e2e6e0;
    background: #fff;
    color: #849087;
    text-decoration: none;
    font-family: Arial,sans-serif;
    font-size: 1.05rem;
}

    .referees-search-reset:hover {
        background: #fff1ef;
        color: #a84e45;
    }


/* =========================================================
   Result line
   ========================================================= */

.referees-result-line {
    min-height: 35px;
    padding: 5px 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #7f8a83;
    font-size: .75rem;
}

    .referees-result-line > div {
        min-width: 0;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .referees-result-line strong {
        color: var(--navy);
        font-family: Arial,sans-serif;
        font-size: .9rem;
    }

    .referees-result-line i {
        color: #bcc3be;
        font-style: normal;
    }

    .referees-result-line small {
        flex: 0 0 auto;
        color: #9a7b31;
        font-size: .7rem;
    }


/* =========================================================
   Cards
   ========================================================= */

.referees-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 11px;
}

.referee-card {
    min-width: 0;
    overflow: hidden;
    display: block;
    border: 1px solid #dfe6dc;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(20,42,24,.035);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

    .referee-card[hidden] {
        display: none !important;
    }

    .referee-card:hover {
        color: inherit;
        border-color: #d8d3ae;
        box-shadow: 0 13px 30px rgba(72,62,25,.09);
        transform: translateY(-3px);
    }

.referee-card-photo {
    position: relative;
    height: 218px;
    overflow: hidden;
    background: linear-gradient( 145deg, #f1efd9, #d8d5b7);
}

    .referee-card-photo > img,
    .referee-photo-placeholder {
        width: 100%;
        height: 100%;
    }

    .referee-card-photo > img {
        display: block;
        object-fit: cover;
        object-position: center top;
    }

.referee-photo-placeholder {
    display: grid;
    place-items: center;
    background: radial-gradient( circle at 50% 20%, rgba(255,255,255,.76), transparent 30%), linear-gradient( 145deg, #ede7bc, #d5cc8d);
    color: #725f1d;
    font-size: 3rem;
    font-weight: 900;
}

.referee-card-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( 180deg, rgba(25,28,18,0) 52%, rgba(22,28,18,.5) 100%);
    pointer-events: none;
}

.referee-card-badges {
    position: absolute;
    top: 9px;
    right: 9px;
    left: 9px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px;
}

.referee-verified-badge,
.referee-status-badge {
    min-height: 24px;
    padding: 4px 7px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.referee-verified-badge {
    background: #e9f6e6;
    color: #4d7b37;
}

.referee-status-badge {
    margin-inline-start: auto;
    background: rgba(19,55,36,.82);
    color: #fff;
    backdrop-filter: blur(5px);
}

    .referee-status-badge.status-2,
    .referee-status-badge.status-4,
    .referee-status-badge.status-5 {
        background: rgba(67,76,70,.84);
    }

    .referee-status-badge.status-3 {
        background: rgba(167,72,56,.88);
    }

.referee-class-ribbon {
    position: absolute;
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 5px 8px;
    overflow: hidden;
    border-radius: 7px;
    background: rgba(255,255,255,.93);
    color: #6d5d21;
    font-size: .75rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referee-card-body {
    padding: 12px;
}

.referee-card-name {
    min-height: 48px;
}

    .referee-card-name h3 {
        margin: 0;
        overflow: hidden;
        color: var(--navy);
        font-size: 1rem;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .referee-card-name > span {
        display: block;
        margin-top: 2px;
        overflow: hidden;
        color: #919b95;
        font-size: .74rem;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: right;
    }

.referee-card-primary {
    min-height: 64px;
    margin-top: 7px;
    padding: 7px 0;
    display: grid;
    gap: 5px;
    border-top: 1px solid #edf0ed;
    border-bottom: 1px solid #edf0ed;
}

    .referee-card-primary span {
        overflow: hidden;
        color: #55635a;
        font-size: .78rem;
        font-weight: 800;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.referee-card-meta {
    min-height: 38px;
    padding: 7px 0 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

    .referee-card-meta span {
        padding: 3px 6px;
        border-radius: 6px;
        background: #f4f5f0;
        color: #78847c;
        font-size: .7rem;
    }

.referee-assignment-stats {
    min-height: 57px;
    margin-top: 3px;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    border: 1px solid #e7ebe5;
    border-radius: 9px;
    background: #fafbf9;
}

    .referee-assignment-stats > div {
        min-width: 0;
        padding: 7px 4px;
        display: grid;
        place-items: center;
        align-content: center;
        border-inline-start: 1px solid #e7ebe5;
        text-align: center;
    }

        .referee-assignment-stats > div:first-child {
            border-inline-start: 0;
        }

    .referee-assignment-stats strong {
        color: var(--navy);
        font-family: Arial,sans-serif;
        font-size: .92rem;
    }

    .referee-assignment-stats span {
        margin-top: 1px;
        color: #89938d;
        font-size: .66rem;
    }

.referee-card-footer {
    min-height: 62px;
    margin-top: 8px;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #edf0ed;
}

    .referee-card-footer > div {
        min-width: 0;
    }

        .referee-card-footer > div > span,
        .referee-card-footer > div > strong,
        .referee-card-footer > div > small {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .referee-card-footer > div > span {
            color: #929c96;
            font-size: .68rem;
        }

        .referee-card-footer > div > strong {
            margin-top: 2px;
            color: #4d5a52;
            font-size: .78rem;
            font-weight: 900;
        }

        .referee-card-footer > div > small {
            margin-top: 1px;
            color: #99873f;
            font-size: .66rem;
        }

    .referee-card-footer > b {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: var(--green-dark);
        font-size: .74rem;
        font-weight: 900;
    }


/* =========================================================
   Empty / load more
   ========================================================= */

.referees-message {
    min-height: 190px;
    padding: 24px;
    display: grid;
    place-items: center;
    align-content: center;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    text-align: center;
}

    .referees-message > span {
        font-size: 1.8rem;
    }

    .referees-message > strong {
        margin-top: 5px;
        color: var(--navy);
        font-size: 1rem;
    }

    .referees-message > p {
        max-width: 520px;
        margin: 5px 0 10px;
        color: var(--muted);
        font-size: .8rem;
    }

    .referees-message > a {
        min-height: 34px;
        padding: 6px 11px;
        display: inline-flex;
        align-items: center;
        border-radius: 8px;
        background: var(--green);
        color: #fff;
        text-decoration: none;
        font-size: .76rem;
        font-weight: 900;
    }

    .referees-message.is-error {
        min-height: 90px;
        border-color: #efcfcb;
        background: #fff7f6;
        color: #9b473f;
        font-size: .82rem;
    }

.referees-load-more {
    min-width: 170px;
    min-height: 40px;
    margin: 16px auto 0;
    padding: 7px 14px;
    display: block;
    border: 1px solid #dcd6ae;
    border-radius: 9px;
    background: #fff;
    color: #75611b;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 900;
    cursor: pointer;
}

    .referees-load-more:hover {
        background: var(--yellow-soft);
    }


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1199.98px) {
    .referees-search-form {
        grid-template-columns: minmax(180px,1.4fr) repeat(3,minmax(125px,1fr)) auto;
    }

    .referees-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 991.98px) {
    .referees-search-form {
        grid-template-columns: minmax(200px,2fr) repeat(2,minmax(130px,1fr)) auto;
    }

    .referees-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 767.98px) {
    .referee-register-strip > div > span:last-child {
        display: none;
    }

    .referees-search-form {
        grid-template-columns: 1fr 1fr;
    }

    .referee-search-text-control {
        grid-column: 1 / -1;
    }

    .referees-search-button {
        width: 100%;
    }

    .referees-result-line {
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    .public-referees-page .container {
        padding-inline: 8px;
    }

    .referee-register-strip {
        min-height: 48px;
    }

        .referee-register-strip strong {
            font-size: .8rem;
        }

        .referee-register-strip > a {
            min-height: 32px;
            padding-inline: 9px;
            font-size: .72rem;
        }

    .referees-search-form {
        grid-template-columns: 1fr;
    }

    .referee-search-text-control {
        grid-column: auto;
    }

    .referees-search-reset {
        width: 100%;
    }

    .referees-result-line {
        font-size: .7rem;
    }

    .referees-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .referee-card-photo {
        height: 175px;
    }

    .referee-card-body {
        padding: 9px;
    }

    .referee-card-name h3 {
        font-size: .88rem;
    }

    .referee-card-primary span {
        font-size: .7rem;
    }

    .referee-assignment-stats strong {
        font-size: .8rem;
    }

    .referee-assignment-stats span {
        font-size: .6rem;
    }

    .referee-card-footer > b {
        font-size: 0;
    }

        .referee-card-footer > b span {
            font-size: .85rem;
        }
}

@media (max-width: 390px) {
    .referees-grid {
        grid-template-columns: 1fr;
    }

    .referee-card-photo {
        height: 235px;
    }
}
