﻿/* ================================================
   MATCH DETAIL PAGE - REDESIGNED
   ================================================ */

.dashboard-header-match {
    background:
        linear-gradient(135deg, rgba(10, 22, 40, 0.28) 0%, rgba(15, 39, 68, 0.20) 55%, rgba(10, 22, 40, 0.34) 100%),
        url("../images/Jembatan Barelang.png"),
        linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 45%, var(--blue-primary) 100%);
    background-size: cover, 106%, cover;
    background-position: center, 26% 54%, center;
    background-repeat: no-repeat;
    padding: 72px 50px 96px;
    min-height: 360px;
    position: relative;
    overflow: hidden;
    color: white;
    isolation: isolate;
}

.dashboard-header-match::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 36%),
        linear-gradient(180deg, rgba(10, 22, 40, 0.18) 0%, rgba(10, 22, 40, 0.30) 100%),
        linear-gradient(110deg, rgba(255, 255, 255, 0) 33%, rgba(255, 255, 255, 0.46) 50%, rgba(255, 255, 255, 0) 67%);
    background-size: auto, auto, 220% 100%;
    background-position: center, center, -160% 0;
    opacity: 1;
    pointer-events: none;
    animation: barelangReveal 4.4s ease-in-out infinite alternate, barelangShimmer 6.2s linear infinite;
}

.dashboard-header-match::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

.dashboard-header-match .dashboard-header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dashboard-header-match .header-subtitle {
    color: rgba(255, 255, 255, 0.93);
    font-size: 14px;
    max-width: 560px;
    line-height: 1.6;
    text-shadow: 0 3px 14px rgba(10, 22, 40, 0.5);
}

.dashboard-header-match .btn-primary,
.dashboard-header-match .btn-secondary {
    background: rgba(10, 22, 40, 0.38);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: none;
    backdrop-filter: blur(2px);
}

.dashboard-header-match .btn-primary:hover,
.dashboard-header-match .btn-secondary:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--navy-dark);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

.header-meta {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.meta-chip i {
    color: var(--gold-light);
}

.match-summary-card {
    position: relative;
    overflow: hidden;
}

.match-summary-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 60%);
    pointer-events: none;
}

.match-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.match-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: 1px solid var(--gray-200);
    background: var(--gray-100);
    color: var(--navy);
}

.event-tag {
    background: var(--white-blue);
    color: var(--blue-primary);
    border-color: rgba(59, 130, 246, 0.2);
}

.code-tag {
    background: var(--white);
}

.status-tag {
    border-color: transparent;
}

.match-teams-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.match-team-logo {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: var(--shadow-sm);
}

.match-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-logo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--gray-100);
    color: var(--gray-400);
    border: 1px dashed var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-team-logo .team-logo-placeholder {
    font-size: 34px;
}

.match-team-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--navy);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-team-uniform {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-500);
    max-width: 180px;
    line-height: 1.35;
}

.match-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.score-pill {
    background: var(--navy-dark);
    color: white;
    padding: 10px 20px;
    border-radius: 14px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(15, 39, 68, 0.2);
}

.vs-pill {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-200);
    color: var(--red);
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
}

.score-subtext {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-500);
}

.match-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.match-meta-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
}

.match-meta-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-primary);
}

.match-meta-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
}

.match-meta-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: var(--gray-100);
    color: var(--navy);
    border: 1px solid var(--gray-200);
}

.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
    font-weight: 800;
}

/* Specific enhancement for meta-chips in dark headers to ensure high contrast */
.header-meta .status-completed {
    background: #10b981;
    color: white;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.header-meta .status-completed i {
    color: white;
}

.status-scheduled {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.35);
}

.status-ongoing {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.35);
}

.status-coming-soon,
.status-open,
.status-accepted {
    background: rgba(14, 165, 233, 0.15);
    color: #0369a1;
    border-color: rgba(14, 165, 233, 0.35);
}

.status-postponed,
.status-cancelled,
.status-abandoned,
.status-rejected,
.status-expired {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.35);
}

.status-tba {
    background: rgba(148, 163, 184, 0.2);
    color: var(--gray-600);
    border-color: var(--gray-200);
}

/* Ensure all status chips in the dark header are always readable */
.header-meta .status-scheduled,
.header-meta .status-ongoing,
.header-meta .status-coming-soon,
.header-meta .status-open,
.header-meta .status-accepted,
.header-meta .status-postponed,
.header-meta .status-cancelled,
.header-meta .status-abandoned,
.header-meta .status-rejected,
.header-meta .status-expired,
.header-meta .status-tba {
    color: #fff;
    border-color: transparent;
}

.header-meta .status-scheduled { background: #2563eb; }
.header-meta .status-ongoing { background: #d97706; }
.header-meta .status-coming-soon,
.header-meta .status-open,
.header-meta .status-accepted { background: #0284c7; }
.header-meta .status-postponed,
.header-meta .status-cancelled,
.header-meta .status-abandoned,
.header-meta .status-rejected,
.header-meta .status-expired { background: #dc2626; }
.header-meta .status-tba { background: #475569; }

.header-meta .status-scheduled i,
.header-meta .status-ongoing i,
.header-meta .status-coming-soon i,
.header-meta .status-open i,
.header-meta .status-accepted i,
.header-meta .status-postponed i,
.header-meta .status-cancelled i,
.header-meta .status-abandoned i,
.header-meta .status-rejected i,
.header-meta .status-expired i,
.header-meta .status-tba i {
    color: #fff;
}

.lineup-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: var(--white-blue);
    color: var(--navy);
    border: 1px solid var(--gray-200);
}

.lineups-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 12px;
}

.lineup-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.lineup-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.lineup-team {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.lineup-team-info {
    min-width: 0;
}

.lineup-team-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.lineup-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lineup-team-logo .team-logo-placeholder {
    font-size: 20px;
}

.lineup-team-name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lineup-count {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 600;
}

.team-side-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--white-blue);
    color: var(--blue-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.team-side-badge.away {
    background: var(--gray-100);
    color: var(--navy);
    border-color: var(--gray-200);
}

.lineup-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lineup-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.lineup-player:hover {
    background: var(--white-blue);
    border-color: var(--blue-primary);
    transform: translateX(2px);
}

.lineup-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--gray-200);
    background: var(--white);
}

.lineup-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
    font-size: 16px;
}

.lineup-info {
    flex: 1;
    min-width: 0;
}

.lineup-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lineup-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--gray-500);
    align-items: center;
    margin-top: 2px;
}

.lineup-number {
    font-weight: 800;
    color: var(--blue-primary);
}

.lineup-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

@media (min-width: 768px) {
    .dashboard-header-match h1 {
        font-size: 38px;
        letter-spacing: 2px;
    }

    .dashboard-header-match {
        padding: 60px 30px 80px;
        background-size: cover, 106%, cover;
        background-position: center, 28% 56%, center;
    }

    .dashboard-header-match .dashboard-header-inner {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

@media (min-width: 992px) {
    .dashboard-header-match {
        padding: 72px 50px 96px;
        background-size: cover, 106%, cover;
        background-position: center, 26% 54%, center;
    }
}

@media (max-width: 992px) {
    .dashboard-header-match {
        padding: 44px 16px 64px;
        min-height: 360px;
        background-size: cover, 146%, cover;
        background-position: center, 34% 62%, center;
    }
}

@media (min-width: 992px) {
    .lineups-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .match-teams-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .match-team-logo {
        width: 84px;
        height: 84px;
    }

    .vs-pill {
        width: 60px;
        height: 60px;
    }

    .score-pill {
        font-size: 22px;
    }

    .lineup-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .dashboard-header-match {
        padding: 44px 16px 64px;
        min-height: 360px;
        background-size: cover, 146%, cover;
        background-position: center, 34% 62%, center;
    }

    .match-team-name {
        max-width: 120px;
    }

    .match-team-uniform {
        max-width: 140px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-header-match {
        animation: none !important;
        background-size: cover, 106%, cover;
        background-position: center, 26% 54%, center;
    }

    .dashboard-header-match::before {
        animation: none !important;
        opacity: 0.1;
    }
}

@keyframes barelangReveal {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.10;
    }
}

@keyframes barelangShimmer {
    0% {
        background-position: center, center, -130% 0;
    }

    100% {
        background-position: center, center, 145% 0;
    }
}
