/**
 * competition_common.css
 * Shared styling for all competition pages
 * Imported into: competition_list.css, competition_detail.css, competition_results.css
 */
/* ============================================================================
   Status Pills & Badges
   ============================================================================ */

.comp-status-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all var(--duration-fast) var(--easing-smooth);
}

/* Status color variants */
.comp-status-pill.draft {
    background-color: #f0f0f0;
    color: #666;
}

.comp-status-pill.pending_review {
    background-color: #fff3cd;
    color: #856404;
}

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

.comp-status-pill.approved,
.comp-status-pill.live {
    background-color: #d4edda;
    color: #155724;
}

.comp-status-pill.registration_open {
    background-color: #cfe2ff;
    color: #084298;
}

.comp-status-pill.registration_closed {
    background-color: #e7d4f5;
    color: #5a189a;
}

.comp-status-pill.ongoing {
    background-color: #fff3cd;
    color: #997404;
}

.comp-status-pill.completed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.comp-status-pill.results_pending {
    background-color: #f8f9fa;
    color: #495057;
}

/* ============================================================================
   Competition Cards
   ============================================================================ */

.comp-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--duration-fast) var(--easing-smooth);
    display: flex;
    flex-direction: column;
}

.comp-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.comp-card-header {
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.comp-card-header h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.comp-card-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.comp-card-body {
    padding: 16px;
    flex-grow: 1;
}

.comp-card-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.comp-card-detail i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.comp-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================================
   Competition Detail Page
   ============================================================================ */

.comp-detail-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 32px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.comp-detail-hero h1 {
    margin: 0 0 8px 0;
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 700;
}

.comp-detail-hero p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.comp-detail-content {
    display: grid;
    gap: 20px;
}

.comp-detail-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 20px;
}

.comp-detail-section h2 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 12px;
}

.comp-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.comp-detail-item:last-child {
    border-bottom: none;
}

.comp-detail-item-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.comp-detail-item-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================================================
   Registration Modal
   ============================================================================ */

.comp-register-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.comp-register-modal.show {
    display: flex;
    animation: fadeIn var(--duration-normal) var(--easing-smooth);
}

.comp-register-modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp var(--duration-normal) var(--easing-smooth);
}

.comp-register-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comp-register-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.comp-register-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--duration-fast) var(--easing-smooth);
}

.comp-register-modal-close:hover {
    color: var(--text-primary);
}

.comp-register-modal-body {
    padding: 20px;
}

.comp-register-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ============================================================================
   Timeline Display
   ============================================================================ */

.timeline-events {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-event {
    padding: 12px;
    background-color: var(--bg-subtle);
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.timeline-event:nth-child(odd) {
    border-left-color: var(--primary);
}

.timeline-event:nth-child(even) {
    border-left-color: var(--secondary);
}

.event-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-label i {
    color: var(--primary);
}

.event-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 20px;
}

.timeline-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    padding: 10px 12px;
    background-color: var(--bg-subtle);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
}

.timeline-time {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 600;
}

.timeline-event {
    font-size: 13px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-event i {
    color: var(--primary);
    min-width: 16px;
}

/* ============================================================================
   Animations
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
    .comp-card-footer {
        flex-wrap: wrap;
    }

    .comp-detail-item {
        flex-direction: column;
        gap: 8px;
    }

    .comp-register-modal-content {
        width: 95%;
        max-height: 85vh;
    }
}
