/* Registration Section Styles */
.registration-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 20px 0;
    border: 1px solid #f0f0f0;
}

.registration-header h3 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.registration-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

.registration-status.open {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.registration-status.upcoming {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
}

.registration-status.closed {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.registration-status.unavailable {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.status-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.status-text {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.status-detail {
    font-size: 0.9rem;
    opacity: 0.9;
}

.registration-details {
    margin-top: 12px;
}

.registration-time,
.registration-method,
.contact-info {
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007aff;
}

.registration-time strong,
.registration-method strong,
.contact-info strong {
    color: #333;
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.registration-time span,
.registration-method span,
.contact-info span {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Enhanced Button Styles */
.race-actions {
    padding: 0 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-secondary {
    width: 100%;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:active {
    background: #e9ecef;
}

.btn-outline {
    width: 100%;
    background: white;
    color: #007aff;
    border: 2px solid #007aff;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:active {
    background: #f0f8ff;
}

.registration-btn {
    background: linear-gradient(135deg, #00b894, #00cec9) !important;
}

/* Registration status badges for race cards */
.registration-status-inline {
    margin-bottom: 8px;
}

.reg-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.reg-open {
    background-color: #28a745;
}

.reg-upcoming {
    background-color: #ffc107;
    color: #333;
}

.reg-closed {
    background-color: #dc3545;
}

.reg-unknown {
    background-color: #6c757d;
}

/* Race Detail Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 20px auto;
    padding: 0;
    border-radius: 12px;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    background: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.race-detail-container {
    padding: 20px;
}

.race-detail-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.race-detail-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.race-detail-content {
    padding: 0;
}

.info-section {
    margin-bottom: 25px;
}

.info-section h3 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.info-item {
    margin-bottom: 12px;
    line-height: 1.5;
}

.info-item strong {
    color: #555;
    font-weight: 600;
    display: inline-block;
    min-width: 80px;
}

.deadline {
    color: #e74c3c;
    font-weight: 600;
}

.registration-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.registration-link:hover {
    text-decoration: underline;
}

.contact-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 5px;
}

.race-items-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.race-items-detail .race-item-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.race-detail-actions {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 0 -20px -20px -20px;
    border-radius: 0 0 12px 12px;
}

.race-detail-actions .btn-share,
.race-detail-actions .btn-register-large {
    flex: 1;
    max-width: 200px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.race-detail-actions .btn-share {
    background: #6c757d;
    color: white;
}

.race-detail-actions .btn-share:hover {
    background: #5a6268;
}

.race-detail-actions .btn-register-large {
    background: #28a745;
    color: white;
}

.race-detail-actions .btn-register-large:hover {
    background: #218838;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: 95vh;
    }
    
    .race-detail-container {
        padding: 15px;
    }
    
    .race-detail-title {
        font-size: 1.2rem;
    }
    
    .race-detail-actions {
        padding: 15px;
        margin: 0 -15px -15px -15px;
    }
    
    .race-detail-actions .btn-share,
    .race-detail-actions .btn-register-large {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}