/* =======================
   Win Ratio Badges
   ======================= */
.win-ratio-badge {
    border-radius: 12px;
    color: white;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.2;
    margin-top: 5px;
    padding: 4px 10px;
    text-align: center;
}
.win-ratio-badge span {
    display: block;
    font-size: 0.7rem;   
    font-weight: normal;
    opacity: 0.85;       
}
.win-ratio-high { background: #28a745; }  
.win-ratio-low  { background: #dc3545; }   
.win-ratio-med  { background: #ffc107; }  


/* =======================
   Coach Card Container
   ======================= */
.coach-card {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.coach-card-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.coach-card-top {
    background: #333;   /* fallback static */
    border-radius: 0.5rem;
    color: #fff;        /* fallback static */
    max-width: 450px;
    padding: 1.25rem;
    width: 100%;
}

/* =======================
   Header Row: Name + Photo / Info
   ======================= */
.coach-age,
.coach-born,
.coach-clubs {
    color: #ffffff; 
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.coach-flex-container {
    display: flex;
    flex-direction: column;
}

.coach-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.coach-name {
    color: #fff; /* fallback static */
    font-size: 1.75rem;
    flex: 1;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5rem 0;
    padding-right: 1rem;
    word-break: break-word;
}

/* Right Column: Photo */
.coach-photo {
    flex-shrink: 0;
    height: 140px;
    overflow: hidden;
    width: 140px;
}

.coach-photo img {
    background: radial-gradient(circle,
              rgba(255, 255, 255, 1) 0%,    
              rgba(200, 200, 200, 1) 60%,   
              rgba(100, 100, 100, 1) 100%   
            );
    border: 3px solid white;
    border-radius: 50%;
    display: block;
    height: 120px;
    margin-right: 20px;
    margin-top: 10px;
    object-fit: cover;
    width: 120px;
}

.coach-card-themed-hero-mask {
    position: relative;
    overflow: hidden;
    border-radius: 12px; /* match your card rounding */
}

.coach-card-themed-hero-mask__angle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: 120px;
    transform: rotate(45deg) translate(50%, 50%);
    transform-origin: bottom right;
    transition: transform 0.5s ease, width 0.5s ease, height 0.5s ease;
}

.coach-card-themed-hero-mask:hover .coach-card-themed-hero-mask__angle {
    width: 300%;
    height: 300%;
    transform: rotate(45deg) translate(0%, 0%);
}

.coach-profile-club {
    font-size: 0.8rem;
}

.coach-profile-club-date {
    font-size: 0.6rem;
    opacity: 0.8;
    font-style: italic;
    margin-bottom: 0.25rem;
}


/* =======================
   Tabs
   ======================= */
.coach-card-tabs {
    display: grid;
    gap: 0.25rem;
    grid-template-columns: repeat(5, 1fr);
    margin-top: 1rem;
}

.coach-tab-btn {
    background: #ffffff22;
    border-radius: 0.3rem;
    color: #fff;  /* static fallback */
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 0;
    text-align: center;
    transition: background 0.2s;
    user-select: none;
}

.coach-tab-btn.active {
    background: #ffffff55;
}

.coach-tab-btn:hover {
    background: #ffffff33;
}

/* =======================
   Tab Content
   ======================= */
.coach-details {
	margin-bottom: 65px;
}

.coach-detail .detail-label {
    color: white;
    font-size: 0.5625rem;
}

.coach-detail .detail-value {
    font-size: 0.75rem;
    font-weight: bold;
}

.coachDetails {
    border-radius: 1rem;
}

.coach-details-grid {
    color: #fff;
    display: grid;
    gap: 0.15rem;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 125px;
    text-align: center;
    z-index: 3;
}

.coach-tab-content {
    display: none;
    transform: translateY(20px);
    transition: 0.4s ease;
}

.coach-tab-content.active {
    display: block;
    margin-bottom: 65px;
    padding-bottom: 65px;
}

.coach-tab-content.show {
    opacity: 1;
    transform: translateY(0);
}

/* =======================
   Coach Grid / Boxes
   ======================= */
.coach-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin: 2rem 0;
}

.coach-box {
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex: 1 1 calc(50% - 1rem);
    margin: 0 auto;
    opacity: 0;
    padding: 1rem;
    transform: translateY(20px);
    transition: box-shadow 0.2s ease, opacity 0.6s ease, transform 0.6s ease;
    width: 95%;
}

.coach-box h3 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.coach-box.show {
    opacity: 1;
    transform: translateY(0);
}

.coach-box:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.bG2 {
	background: linear-gradient(135deg, #fdfdfd, #e6f0ff); 
	box-shadow:0 6px 18px rgba(0,0,0,0.12);  
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bG3 {
	background: linear-gradient(135deg, #fdfdfd, #ffe6e6); 
	box-shadow:0 6px 18px rgba(0,0,0,0.12); 
	transition: transform 0.3s ease, box-shadow 0.3s ease;	
}



/* =======================
   Stats / Overview
   ======================= */
.bySeason {
    opacity: 1 !important;
    transform: none !important;
}

.bySeason.show {
    opacity: 1;
    transform: translateY(0);
}

.coach-progress-bar {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    height: 12px;
    background: #eee;
}

.progress-segment {
    height: 100%;
    width: 0;           /* start collapsed */
    transition: width 1s ease-in-out;
}

.progress-segment.win { background: #28a745; }
.progress-segment.draw { background: #ffc107; }
.progress-segment.loss { background: #dc3545; }


.fade-container.fade-out {
    opacity: 0.5;
}

.ov-label {
    color: #555;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ov-section {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    transition: background 0.2s;
    margin-bottom: 10px;
}

.ov-section:hover {
    background: #f0f7ff;
}

.ov-value {
    color: #111;
    font-size: 20px;
    font-weight: 700;
}

.overviewBox {
    background: #fefefe;
    border: 1px solid #ddd;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 12px;
    padding: 18px 20px;
}

.progress-bar {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    height: 12px;
    background: #eee;
}

.progress-win,
.progress-loss {
    height: 100%;
    width: 0;                  /* start collapsed */
    transition: width 1s ease-in-out;
}


.statCell {
    background: #fafafa;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    padding: 0.3rem 0.2rem;
    text-align: center;
}

.statHeaderCell {
    background: #f0f0f0;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 0.3rem 0.2rem;
    text-align: center;
}

.stat-big {
    font-size: 2rem;
    font-weight: 700;
}

.stat-sub {
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* =======================
   Competition small helpers
   ======================= */
.competition {
    align-items: center;
    display: flex;
    margin-top: 0.5rem;
}
.competition img {
    height: 24px;
    margin-right: 0.5rem;
    width: 24px;
}

/* =======================
   Stats container layout
   ======================= */
#statsContainer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.seasonTitle {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.statsHeader,
.statsRow {
    display: grid;
    gap: 0.25rem;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
}


/* =======================
   Fade / Freeze rows
   ======================= */
.freezRow1 {
    background: #fff;
    position: sticky;
    top: 0;              
    z-index: 10;         
}

.freezeRow2 {
    background: #fff;
    position: sticky;
    top: 0.00001em;          
    z-index: 9;
}

/* =======================
   Latest Performances / Sparkline
   ======================= */
.sparkline {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 5px;
}

.match-column {
    font-family: sans-serif;
    min-width: 50px;
    text-align: center;
    flex: 1;
}

.match-date {
    color: #333;
    font-size: 0.75rem;
    margin-bottom: 5px;
}

.result-circle {
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    height: 40px;
    line-height: 40px;
    margin: 0 auto 5px;
    width: 40px;
}

.result-circle.win  { background-color: #28a745; }  /* green */
.result-circle.draw { background-color: #ffc107; color:#333; } /* amber w/ dark text */
.result-circle.loss { background-color: #dc3545; }  /* red */


.opposition-crest {
    display: block;
    height: 30px;
    margin: 0 auto 5px;
    width: 30px;
}

.match-score {
    color: #222;
    font-size: 0.8rem;
    margin-top: 3px;
}

.calendar-date {
    align-items: center;
    background: #fff;
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    height: 65px;
    justify-content: center;
    margin: 0 auto 5px;
    width: 50px;
}

.calendar-day, .calendar-year {
    color: #888;
    font-size: 0.6rem;
    margin-bottom: 2px;
}

.calendar-month {
    color: #888;
    font-size: 0.7rem;
    margin-top: 2px;
}

.calendar-number {
    color: #CC0000;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

.rankings-wheel {
    max-height: 300px;      /* visible height */
    overflow-y: auto;       /* vertical scroll */
    overflow-x: hidden;
    scroll-behavior: smooth;
    border-radius: 8px;
    padding-right: 8px;
}

.coachRow {
    display: flex;
    justify-content: space-between;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.coachName {
	flex: 1;
	text-align: left;
}

.coachRow a {
    align-items: center;
    color: inherit;
    display: flex;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.coachRank {
    align-items: center;
    background-color: #333;
    border-radius: 3px;
    color: white;
    display: flex;
    flex-shrink: 0;
    height: 2em;
    justify-content: center;
    width: 2em;
}

.coachScore {
    color: #666;
    font-size: 0.9em;
}

/* Default state for all coach rows */
.coachRow {
    transition: all 0.3s ease;
    filter: blur(0.5px);      /* slight blur */
    opacity: 0.6;             /* faded a bit */
}

/* The active/first coach for primary color version */
.coachRow.activeCoachPrimary {
    filter: none;             /* remove blur */
    opacity: 1;               /* fully visible */
    font-weight: bold;
    font-size: 1.2em;
}

/* Optional: on hover, show any coach clearly */
.coachRow:hover {
    filter: none;
    opacity: 1;
}

.rankings-wheel::-webkit-scrollbar {
    width: 6px;
}
.rankings-wheel::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 6px;
}


/* Individual coach rows */
.coachRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    margin: 4px 0;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: #555;
    font-size: 14px;
}

/* Active coach highlight */
.activeCoach {
    font-size: 16px;
    font-weight: bold;
    color: #222;
    background-color: rgba(255, 235, 59, 0.2);
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Other coaches blurred/faded */
.otherCoach {
    opacity: 0.6;
    filter: blur(0.3px);
}

/* Optional: hover effect for clarity */
.coachRow:hover {
    background-color: rgba(0,0,0,0.03);
    filter: none;
    opacity: 1;
}





/* =======================
   Media Queries
   ======================= */
@media (max-width: 400px) {
    .calendar-date {
        height: 60px;
        width: 48px;
    }
    .coach-box {
        flex: 1 1 100%;
        padding: 0.75rem;
    }
    .coach-card-header {
        align-items: center;
        flex-direction: column;
    }
    .coach-info {
        margin-bottom: 0.5rem;
        text-align: center;
    }
    .coach-photo {
        height: 120px;
        margin-top: 0.5rem;
        width: 120px;
    }
    .match-column {
        min-width: 50px;
    }
}

@media (max-width: 600px) {
    .coach-box {
        flex: 1 1 100%; 
    }
}
