/* Driver Profile Card Styles */

.driver-profile-modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.driver-profile-card {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 2px solid rgba(255, 102, 0, 0.4);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.driver-profile-header {
    background: linear-gradient(135deg, #000000, #000000);
    padding: 30px;
    border-radius: 18px 18px 0 0;
    position: relative;
    text-align: center;
    box-shadow: 0 8px 32px rgba(255, 102, 0, 0.3);
}

.driver-profile-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.driver-profile-close:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.driver-profile-name {
    font-size: 2.2rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.driver-profile-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.info-bubble {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: help;
    font-size: 0.75rem;
    font-weight: bold;
    transition: all 0.3s;
}

.info-bubble:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.info-bubble-tooltip {
    visibility: hidden;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translate(-75%, 150%);
    background: rgba(26, 26, 26, 0.95);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 100;
    border: 1px solid rgba(255, 102, 0, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}

.info-bubble-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(26, 26, 26, 0.95);
}

.info-bubble:hover .info-bubble-tooltip {
    visibility: visible;
    opacity: 1;
}

.driver-profile-body {
    padding: 30px;
}

.driver-stat-section {
    margin-bottom: 30px;
}

.driver-stat-section:last-child {
    margin-bottom: 0;
}

.driver-stat-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ff8533;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 102, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.driver-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.driver-stat-row:hover {
    background: rgba(255, 102, 0, 0.1);
    border-left-color: #ff6600;
    transform: translateX(5px);
}

.driver-stat-row.indent {
    margin-left: 30px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.95rem;
}

.driver-stat-label {
    color: #cccccc;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.driver-stat-value {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
}

.driver-stat-value.highlight {
    color: #ff6600;
    font-size: 1.3rem;
}

.driver-stat-value.gold {
    color: #FFD700;
}

.driver-stat-value.silver {
    color: #C0C0C0;
}

.driver-stat-value.bronze {
    color: #CD7F32;
}

.driver-trophy-icon {
    font-size: 1.2rem;
}

.driver-loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.driver-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #ff6600;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

.driver-error-state {
    text-align: center;
    padding: 40px 20px;
    color: #ef4444;
}

.driver-error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .driver-profile-card {
        max-width: 95%;
        margin: 10px;
    }

    .driver-profile-header {
        padding: 20px;
    }

    .driver-profile-name {
        font-size: 1.8rem;
    }

    .driver-profile-subtitle {
        font-size: 1rem;
        flex-direction: column;
    }

    .driver-profile-body {
        padding: 20px;
    }

    .driver-stat-section-title {
        font-size: 1.1rem;
    }

    .driver-stat-row {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .driver-stat-row.indent {
        margin-left: 20px;
        font-size: 0.9rem;
    }

    .driver-stat-value {
        font-size: 1rem;
    }

    .driver-stat-value.highlight {
        font-size: 1.15rem;
    }
}

/* Scrollbar styling for profile card */
.driver-profile-card::-webkit-scrollbar {
    width: 8px;
}

.driver-profile-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.driver-profile-card::-webkit-scrollbar-thumb {
    background: rgba(255, 102, 0, 0.5);
    border-radius: 10px;
}

.driver-profile-card::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 102, 0, 0.7);
}
