/* ==========================================
   COACH PROFILE PAGE
   ========================================== */

/* Page Container */
.coach-page-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 24px 15px;
}

/* Coach Header */
.coach-header {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.coach-header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    position: relative;
    z-index: 2;
}

.coach-avatar-wrapper {
    flex-shrink: 0;
}

.coach-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-teal);
    box-shadow: 0 4px 20px rgba(57, 219, 191, 0.2);
}

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

.coach-flag-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.coach-country-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.coach-nationality {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.coach-name {
    font-size: var(--font-size-xxl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

/* Attribute Boxes */
.coach-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.coach-attr-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.coach-attr-box i {
    font-size: 14px;
    color: var(--accent-teal);
}

.coach-attr-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coach-attr-value {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.coach-attr-value a {
    color: var(--accent-teal);
    text-decoration: none;
    transition: var(--transition-fast);
}

.coach-attr-value a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Section */
.coach-section {
    margin-bottom: 24px;
}

/* Two-column layout */
.coach-two-col {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

.coach-col-left {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.coach-col-left::-webkit-scrollbar {
    width: 4px;
}

.coach-col-left::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.coach-section-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.coach-section-title i {
    margin-inline-end: 8px;
    color: var(--accent-teal);
}

/* Matches Table */
.coach-matches {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.coach-matches-table-wrapper {
    overflow-x: auto;
}

.coach-matches-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.coach-matches-table th {
    padding: 12px 16px;
    text-align: start;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.coach-matches-table td {
    padding: 10px 16px;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.coach-matches-table tr:last-child td {
    border-bottom: none;
}

.coach-match-row:hover td {
    background: rgba(57, 219, 191, 0.04);
}

.match-date-cell {
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-secondary);
}

.match-comp-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-comp-cell img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.match-teams-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.match-teams-cell img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.vs-label {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    margin: 0 2px;
}

.match-score-cell {
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.match-time-cell {
    font-weight: 600;
    color: var(--accent-teal);
    white-space: nowrap;
}

/* ==========================================
   CAREER TIMELINE
   ========================================== */

.career-timeline {
    position: relative;
    padding-inline-start: 32px;
}

/* Vertical connecting line */
.career-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-teal) 0%, var(--border-color) 40%, var(--border-color) 100%);
    border-radius: 2px;
}

.career-entry {
    position: relative;
    margin-bottom: 4px;
}

.career-entry:last-child {
    margin-bottom: 0;
}

/* Timeline dot */
.career-dot {
    position: absolute;
    left: -25px;
    top: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    z-index: 2;
    transition: var(--transition-fast);
}

.career-dot-active {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    box-shadow: 0 0 10px rgba(57, 219, 191, 0.4);
}

/* Card */
.career-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: border-color 0.2s ease, background 0.2s ease;
    overflow: hidden;
}

.career-current .career-card {
    border-color: rgba(57, 219, 191, 0.35);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(57, 219, 191, 0.04) 100%);
}

.career-card:hover {
    border-color: rgba(57, 219, 191, 0.3);
}

.career-card-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    min-width: 0;
}

/* Team logo */
.career-team-logo-wrap {
    flex-shrink: 0;
}

.career-team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--bg-secondary);
    padding: 3px;
}

/* Card info */
.career-card-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.career-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.career-team-name {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    display: inline-block;
    vertical-align: middle;
}

a.career-team-name:hover {
    color: var(--accent-teal);
}

span.career-team-name {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    display: inline-block;
    vertical-align: middle;
}

.career-badge-current {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-teal);
    background: rgba(57, 219, 191, 0.12);
    border: 1px solid rgba(57, 219, 191, 0.3);
    padding: 1px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.career-date-range {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.career-date-range i {
    font-size: 12px;
    color: var(--text-muted);
}

.career-date-sep {
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 991.98px) {
    .coach-two-col {
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }
}

@media (max-width: 767.98px) {
    .coach-two-col {
        display: block;
    }

    .coach-col-left {
        position: static;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 24px;
    }

    .coach-header {
        padding: 20px;
    }

    .coach-header-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .coach-flag-row {
        justify-content: center;
    }

    .coach-attributes {
        justify-content: center;
    }

    .coach-name {
        font-size: var(--font-size-xl);
    }

    .career-timeline {
        padding-inline-start: 24px;
    }

    .career-timeline::before {
        left: 7px;
    }

    .career-dot {
        left: -21px;
        width: 10px;
        height: 10px;
    }

    .career-card-inner {
        padding: 8px 10px;
        gap: 8px;
    }

    .career-team-logo {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 575.98px) {
    .coach-avatar {
        width: 80px;
        height: 80px;
    }

    .coach-attr-box {
        padding: 6px 10px;
        font-size: 11px;
    }

    .coach-matches-table th,
    .coach-matches-table td {
        padding: 8px 10px;
    }
}
