/* ================================
   Custom Mobile & Header Refinements
   ================================ */

/* Navbar layout + vertical centering */
.navbar {
    display: flex;
    align-items: center;
    min-height: 135px; /* taller to suit bigger crest */
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

/* Ensure brand area aligns nicely */
.navbar-brand {
    display: flex;
    align-items: center;
}

/* Logo sizing */
.navbar-logo {
    height: 120px; /* BIGGER on desktop */
    width: auto;
    vertical-align: middle;
}

/* Tablet adjustments */
@media (max-width: 992px) {
    .navbar-logo {
        height: 100px;
    }

    .navbar {
        min-height: 120px;
    }
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .navbar-logo {
        height: 80px; /* clearly bigger on mobile */
    }

    .navbar {
        min-height: 95px;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }

    .badge {
        font-size: 0.75rem;
    }

    /* Prevent iOS zoom */
    .form-select,
    .form-control {
        font-size: 16px;
    }

    .card-body {
        padding: 0.75rem;
    }

    .sticky-bottom {
        padding: 0.5rem !important;
    }
}

/* ================================
   Global refinements
   ================================ */

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Better table readability on mobile */
.table-responsive {
    border: 0;
}

/* Row interaction and hover styling */
.table-hover tbody tr[onclick] {
    cursor: pointer;
}

/* Card styling */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

/* ================================
   UX Polish Styles
   ================================ */

:root {
    --bs-border-radius: 0.5rem;
    --bs-border-radius-lg: 0.75rem;
    --bs-border-radius-sm: 0.375rem;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.04)!important;
}

.shadow {
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.08)!important;
}

/* Table Enhancements */
.table-modern {
    border-collapse: separate;
    border-spacing: 0;
}
.table-modern thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
}
.table-modern tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Match Row Hierarchy */
.match-team {
    font-weight: 600;
    font-size: 1rem;
}
.match-vs {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: normal;
}
.match-meta {
    font-size: 0.75rem;
}

/* Action Button Grouping */
.action-step-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.action-step-buttons {
    display: flex;
    gap: 0.25rem;
}

/* Tabs Polish */
.nav-pills-modern .nav-link {
    border-radius: 2rem;
    padding: 0.5rem 1.25rem;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-pills-modern .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.2);
}

/* Filter Card */
.filter-card {
    background: #fff;
    border-radius: var(--bs-border-radius-lg);
}

/* Legend Bar */
.legend-bar {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: var(--bs-border-radius);
    border: 1px solid #e9ecef;
}

/* Empty State */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}
.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

/* Detailed Page Cards */
.game-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9ecef;
}
.game-card:hover {
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.08)!important;
}
.game-card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

/* Winner Toggle Glow */
.winner-selector input:checked + label {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #0d6efd;
}

/* Step Wizard */
.step-wizard {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}
.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 1rem;
}
.step-item:not(:last-child):after {
    content: "";
    position: absolute;
    top: 50%;
    right: -25%;
    width: 50%;
    height: 2px;
    background: #dee2e6;
    z-index: 1;
}
.step-item.active .step-icon {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}
.step-item.completed .step-icon {
    background: #198754;
    color: #fff;
    border-color: #198754;
}
.step-icon {
    width: 2.5rem;
    height: 2.5rem;
    line-height: 2.3rem;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #fff;
    margin: 0 auto 0.5rem;
    position: relative;
    z-index: 2;
    font-weight: bold;
}

/* ================================
   Recent Results (centred scores)
   ================================ */

.rr-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
}

.rr-team {
    min-width: 0; /* required for truncation in grid */
    font-weight: 700;
}

.rr-team.right {
    text-align: right;
}

.rr-scores {
    width: 86px; /* wider to suit 10-0 etc */
    text-align: center;
}

/* ONE definition only */
.score-badge {
    display: inline-block;
    min-width: 60px;
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
