/* ============================================================================
   MeetDirector.Online - Swimming Sport Theme
   ============================================================================ */

:root {
    --pool-blue: #0d6efd;
    --water-teal: #20c997;
    --medal-gold: #ffc107;
    --medal-silver: #e9ecef;
    --medal-bronze: #fd7e14;
    --swim-dark: #0a3a52;
}

/* ============================================================================
   Swimming-Specific Colors
   ============================================================================ */

.stroke-freestyle {
    color: #0d6efd;
}

.stroke-backstroke {
    color: #20c997;
}

.stroke-breaststroke {
    color: #0dcaf0;
}

.stroke-butterfly {
    color: #d63384;
}

.stroke-medley {
    color: #fd7e14;
}

.stroke-relay {
    color: #198754;
}

/* ============================================================================
   Meet Status Colors
   ============================================================================ */

.meet-status-draft {
    background-color: #e9ecef;
    color: #212529;
}

.meet-status-announced {
    background-color: #cfe2ff;
    color: #084298;
}

.meet-status-open {
    background-color: #d1e7dd;
    color: #0f5132;
}

.meet-status-closed {
    background-color: #fff3cd;
    color: #664d03;
}

.meet-status-active {
    background-color: #cff4fc;
    color: #055160;
}

.meet-status-complete {
    background-color: #e8f5e9;
    color: #1b5e20;
}

/* ============================================================================
   Course/Pool Type Icons
   ============================================================================ */

.course-scy::before,
.course-scm::before,
.course-lcm::before {
    display: inline-block;
    margin-right: 0.5rem;
    width: 20px;
    height: 20px;
    font-weight: bold;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
}

.course-scy::before {
    content: 'Y';
    background-color: #0d6efd;
    color: white;
}

.course-scm::before {
    content: 'M';
    background-color: #20c997;
    color: white;
}

.course-lcm::before {
    content: 'L';
    background-color: #0dcaf0;
    color: white;
}

/* ============================================================================
   Athlete Performance Indicators
   ============================================================================ */

.personal-record {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 0.75rem;
    border-radius: 0.375rem;
}

.meet-record {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 0.75rem;
    border-radius: 0.375rem;
}

.state-record {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 0.75rem;
    border-radius: 0.375rem;
}

.national-record {
    background-color: #f3e5f5;
    border-left: 4px solid #9c27b0;
    padding: 0.75rem;
    border-radius: 0.375rem;
}

.world-record {
    background-color: #fce4ec;
    border-left: 4px solid #e91e63;
    padding: 0.75rem;
    border-radius: 0.375rem;
}

/* ============================================================================
   Time Formatting
   ============================================================================ */

.time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.time-fast {
    color: #4caf50;
}

.time-slow {
    color: #f44336;
}

.time-average {
    color: #2196f3;
}

/* ============================================================================
   Lane/Heat Display
   ============================================================================ */

.lane-display {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 0.375rem;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    color: white;
    background-color: #0d6efd;
    margin: 0.25rem;
}

.heat-display {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #e9ecef;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================================================
   Athlete Card/Profile
   ============================================================================ */

.athlete-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.athlete-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.athlete-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.athlete-badge-verified {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #4caf50;
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    margin-left: 0.5rem;
}

/* ============================================================================
   Team Section
   ============================================================================ */

.team-roster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.team-member-card {
    text-align: center;
    padding: 1rem;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.team-member-card:hover {
    background-color: #e9ecef;
}

/* ============================================================================
   Entry/Result Tables
   ============================================================================ */

.entry-table thead th {
    background-color: #0d6efd;
    color: white;
    font-weight: 600;
}

.entry-table tbody tr:hover {
    background-color: #f0f8ff;
}

.entry-submitted {
    color: #0d6efd;
}

.entry-verified {
    color: #20c997;
}

.entry-withdrawn {
    color: #6c757d;
    text-decoration: line-through;
}

.entry-scratched {
    color: #fd7e14;
    font-style: italic;
}

/* ============================================================================
   Results Display
   ============================================================================ */

.results-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    margin: 2rem 0;
}

.podium-position {
    text-align: center;
}

.podium-place-1 {
    order: 2;
    width: 150px;
}

.podium-place-2 {
    order: 1;
    width: 130px;
}

.podium-place-3 {
    order: 3;
    width: 130px;
}

.podium-medal {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.podium-place-1 .podium-medal {
    background-color: var(--medal-gold);
}

.podium-place-2 .podium-medal {
    background-color: var(--medal-silver);
    border: 2px solid #999;
}

.podium-place-3 .podium-medal {
    background-color: var(--medal-bronze);
}

.podium-bar {
    background-color: var(--pool-blue);
    color: white;
    padding: 1rem;
    border-radius: 0.375rem 0.375rem 0 0;
    min-height: 80px;
}

.podium-place-1 .podium-bar {
    min-height: 120px;
}

.podium-place-2 .podium-bar {
    min-height: 100px;
}

.podium-place-3 .podium-bar {
    min-height: 80px;
}

.podium-name {
    font-weight: 600;
    margin: 0.5rem 0;
}

.podium-time {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.podium-place {
    position: absolute;
    top: -10px;
    right: 10px;
    background-color: var(--pool-blue);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ============================================================================
   Records/Achievements
   ============================================================================ */

.achievement-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.25rem;
}

.achievement-pr {
    background-color: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #4caf50;
}

.achievement-mr {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #2196f3;
}

.achievement-sr {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ff9800;
}

.achievement-nr {
    background-color: #f3e5f5;
    color: #4a148c;
    border: 1px solid #9c27b0;
}

.achievement-wr {
    background-color: #fce4ec;
    color: #880e4f;
    border: 1px solid #e91e63;
}

/* ============================================================================
   Swimming-Specific Cards
   ============================================================================ */

.event-card {
    border-left: 4px solid var(--pool-blue);
    transition: all 0.3s ease;
}

.event-card:hover {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.event-name {
    font-weight: 600;
    color: var(--swim-dark);
}

.event-distance {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.event-stroke {
    font-style: italic;
    color: #6c757d;
}

/* ============================================================================
   Responsive Swimming Layout
   ============================================================================ */

@media (max-width: 768px) {
    .results-podium {
        flex-direction: column;
        align-items: center;
    }

    .podium-position {
        width: 100% !important;
    }

    .podium-place-1,
    .podium-place-2,
    .podium-place-3 {
        order: unset !important;
    }

    .team-roster {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
