/**
 * Maxxis Rewards - Race & Win Styles (Redesigned)
 * Modern racing profile layout with prominent rider header
 */

/* Race & Win Container */
.maxxis-race-win {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* Compact Rider Selector */
.rider-selector-compact {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.rider-selector-compact label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.rider-selector-compact select {
    flex: 1;
    max-width: 500px;
    /* padding: 12px 40px 12px 15px; */
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rider-selector-compact select:focus {
    outline: none;
    border-color: #FF5400;
}

/* Rider Profile Header */
.rider-profile-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.rider-profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: #FF5400;
    opacity: 0.08;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.rider-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.rider-main-info {
    flex: 1;
}

.rider-name-section {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 15px;
}

.rider-name {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
}

.race-number-badge {
    background: #FF5400;
    color: white;
    font-size: 36px;
    font-weight: 900;
    padding: 8px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.race-number-badge::before {
    content: '#';
    font-size: 24px;
    opacity: 0.8;
}

.rider-details {
    display: flex;
    gap: 30px;
    font-size: 14px;
    opacity: 0.9;
    flex-wrap: wrap;
}

.rider-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rider-detail-label {
    opacity: 0.7;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.rider-detail-value {
    font-weight: 600;
    font-size: 15px;
}

/* Points Display */
.rider-points-display {
    text-align: right;
}

.points-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.points-value {
    font-size: 56px;
    font-weight: 900;
    color: #FF5400;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(255, 84, 0, 0.3);
}

.points-suffix {
    font-size: 20px;
    opacity: 0.8;
    margin-left: 5px;
}

/* Stats Bar */
.rider-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-top: 25px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.stat-item {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #FF5400;
    display: block;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-top: 5px;
}

/* Content Grid */
.race-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.race-content-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.race-content-section.race-full-width {
    grid-column: 1 / -1;
}

.race-section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1a1a1a;
    border-bottom: 3px solid #FF5400;
    padding-bottom: 10px;
}

/* Race Results Table - Compact Version */
.race-results-table {
    width: 100%;
    border-collapse: collapse;
}

.race-results-table th {
    background: #f8f8f8;
    padding: 12px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    border-bottom: 2px solid #e0e0e0;
}

.race-results-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.race-results-table tr:hover {
    background: #fafafa;
}

.race-results-table td strong {
    color: #1a1a1a;
}

.race-results-table td small {
    color: #999;
    font-size: 12px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-results p {
    margin: 0;
    font-size: 14px;
}

/* Prizes Grid */
.prizes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.prize-card {
    background: #f8f8f8;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.prize-card.available {
    border-color: #28a745;
    background: #f0fff4;
}

.prize-card.locked {
    opacity: 0.7;
}

.prize-card.redeemed {
    border-color: #dedede;
    background: #f1f1f1;
}

.prize-card h3 {
    font-size: 18px;
    margin: 0 0 10px;
    color: #1a1a1a;
    font-weight: 700;
}

.prize-description {
    font-size: 13px;
    color: #666;
    margin: 0 0 15px;
    flex-grow: 1;
}

/* Prize Requirements */
.prize-requirements {
    margin: 15px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

.requirement-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    text-align: left;
    width: 100%;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-checkbox {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.requirement-checkbox svg {
    width: 28px;
    height: 28px;
    stroke: #333;
    stroke-width: 2;
}

.requirement-item.met .requirement-checkbox svg {
    stroke: #333;
}

.requirement-item.unmet .requirement-checkbox svg {
    stroke: #999;
}

.requirement-text {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
}

.requirement-item .prize-points {
    margin-bottom: 0;
    font-size: 20px;
}

.requirement-item.unmet .requirement-text {
    color: #999;
}

.requirement-item.met .requirement-text.prize-points {
    color: #FF5400;
}

.prize-card .maxxis-btn {
    width: 100%;
    font-size: 14px;
    padding: 12px 20px;
    margin-top: auto;
}

.redeem-prize-btn {
    background: #28a745;
    color: #fff;
    font-weight: 700;
}

.redeem-prize-btn:hover {
    background: #218838;
}

/* Prizes Info */
.prizes-info {
    background: #ffebe2;
    border-radius: 6px;
    padding: 15px 20px;
    font-size: 13px;
    color: #404040;
    margin-top: 20px;
}

.prizes-info p {
    margin: 0;
}

/* No Riders Message */
.no-riders-message {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    color: #666;
}

/* Form Styles */
.maxxis-form-group {
    margin-bottom: 20px;
}

.maxxis-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.maxxis-form-group input[type="text"],
.maxxis-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.maxxis-form-group input[type="text"]:focus,
.maxxis-form-group select:focus {
    outline: none;
    border-color: #FF5400;
}

.maxxis-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Points Preview */
.points-preview {
    background: #f0fff4;
    border: 2px solid #28a745;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.preview-points {
    font-size: 18px;
    font-weight: 800;
    color: #28a745;
}

/* Responsive Design */
@media (max-width: 992px) {
    .race-content-grid {
        grid-template-columns: 1fr;
    }
    
    .prizes-grid {
        grid-template-columns: 1fr;
    }
    
    .rider-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .rider-name-section {
        justify-content: center;
    }
    
    .rider-details {
        justify-content: center;
    }
    
    .rider-points-display {
        text-align: center;
    }
    
    .rider-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rider-profile-header {
        padding: 20px;
    }
    
    .rider-name {
        font-size: 28px;
    }
    
    .race-number-badge {
        font-size: 24px;
        padding: 6px 12px;
    }
    
    .race-number-badge::before {
        font-size: 18px;
    }
    
    .points-value {
        font-size: 42px;
    }
    
    .rider-name-section {
        flex-direction: row;
        gap: 10px;
        align-items: center;
        justify-content: center;
    }
    
    .rider-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .rider-detail-item {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .maxxis-form-row {
        grid-template-columns: 1fr;
    }
    
    .rider-selector-compact {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .rider-selector-compact label {
        text-align: left;
    }
    
    .rider-selector-compact select {
        width: 100%;
        max-width: 100%;
    }
    
    .race-content-section {
        padding: 20px;
    }
    
    .race-section-title {
        font-size: 18px;
    }
    
    /* Mobile-friendly table */
    .race-results-table thead {
        display: none;
    }
    
    .race-results-table tr {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid #e6e6e6;
    }
    
    .race-results-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
    }
    
    .race-results-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        font-size: 12px;
    }
}
