/* ============================================================
   Rugby Speelschema - Custom Styles
   ============================================================ */

/* ---- Layout ---- */
body {
    min-height: 100vh;
}

/* Admin layout met sidebar */
#wrapper {
    min-height: calc(100vh - 56px);
    margin-top: 56px;
}

#sidebar {
    width: 250px;
    min-height: calc(100vh - 56px);
    position: fixed;
    top: 56px;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    transition: margin-left 0.3s ease;
}

#page-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: calc(100vh - 56px);
}

/* ---- Sidebar styling ---- */
#sidebar .nav-link {
    color: #333;
    padding: 0.5rem 1rem;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

#sidebar .nav-link:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
    color: #0d6efd;
}

#sidebar .nav-link.active {
    background-color: #e7f1ff;
    border-left-color: #0d6efd;
    color: #0d6efd;
    font-weight: 600;
}

#sidebar .nav-link i {
    width: 20px;
    margin-right: 8px;
    text-align: center;
}

.sidebar-heading {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ---- Cards ---- */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* ---- Tabellen ---- */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

/* ---- Badges ---- */
.badge {
    font-weight: 500;
}

/* ---- Speelschema specifiek ---- */
.schedule-day .card-header {
    font-weight: 600;
}

.schedule-row.hidden {
    display: none;
}

/* ---- Sidebar overlay (mobiel) ---- */
#sidebar-overlay {
    display: none;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
    }

    #sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
    }

    #sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        top: 56px;
        background-color: rgba(0, 0, 0, 0.4);
        z-index: 1040;
    }

    #sidebar-overlay.show {
        display: block;
    }

    #page-content {
        margin-left: 0;
        width: 100%;
    }
}

/* ---- Public page styling ---- */
.club-card {
    border-radius: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.club-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(26, 122, 58, 0.15);
}

/* Subtiele streep accent boven publieke kaarten */
.public-accent-top {
    border-top: 3px solid #2d9e50;
}

/* ---- Login pagina ---- */
.card.shadow {
    border-radius: 0.5rem;
}

/* ---- Beschikbaarheidsmatrix ---- */
.availability-matrix th,
.availability-matrix td {
    vertical-align: middle;
    font-size: 0.85rem;
}

.availability-matrix .sticky-col {
    position: sticky;
    left: 0;
    background-color: #fff;
    z-index: 1;
    border-right: 2px solid #dee2e6;
}

.availability-matrix thead .sticky-col {
    background-color: #f8f9fa;
    z-index: 2;
}

.availability-cell {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.availability-cell .form-switch .form-check-input {
    cursor: pointer;
    width: 2.5em;
    height: 1.25em;
    margin-left: 0;
}

.availability-cell .form-switch .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

.availability-cell .form-switch .form-check-input:not(:checked) {
    background-color: #dc3545;
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* ---- Inline max-host-teams input ---- */
.max-host-input {
    text-align: center;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.max-host-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

.availability-note {
    max-width: 110px;
    margin: 0 auto;
}

.availability-col-header .toggle-hint,
.availability-row-header .toggle-hint {
    font-size: 0.65rem;
    color: #adb5bd;
    background-color: transparent !important;
    border: 1px solid #dee2e6;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.availability-col-header:hover .toggle-hint,
.availability-row-header:hover .toggle-hint {
    opacity: 1;
    color: #0d6efd;
    border-color: #0d6efd;
}

.availability-col-header:hover,
.availability-row-header:hover {
    background-color: #e8f0fe !important;
}

/* ---- Speelschema admin ---- */
.badge.bg-outline-primary {
    color: #0d6efd;
    background-color: transparent !important;
    border: 1px solid #0d6efd;
}

/* ---- Leeftijdscategorie badges (rood-wit-blauw) ---- */
.badge-category-red {
    background-color: #AE1C28 !important;
    color: #fff !important;
}
.badge-category-white {
    background-color: #fff !important;
    color: #333 !important;
    border: 1.5px solid #ccc !important;
}
.badge-category-blue {
    background-color: #21468B !important;
    color: #fff !important;
}

/* ---- Nieuws kaarten ---- */
.news-card:hover {
    background-color: #f0f4ff !important;
}

/* Border-end alleen op md+ voor nieuwsgrid */
@media (min-width: 768px) {
    .border-end-md {
        border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
    }
}

/* ---- Print stijlen ---- */
@media print {
    .navbar, #sidebar, .btn, .alert, footer {
        display: none !important;
    }

    #page-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
