/**
 * EXACT Sports - Modernized Camperinfo Page Styles
 *
 * Design System Reference:
 * - Figma: https://www.figma.com/design/RKWO7f3jSJyaUJb7fmGcOt/Exact-Rankings?node-id=583-6388
 * - Live Reference: https://exactsports.com/events/
 *
 * Color Palette:
 * - Primary: #FE5000 (EXACT Orange)
 * - Neutrals: White, Black, Gray variations
 *
 * Typography:
 * - Primary: Poppins (sans-serif)
 * - Display: Bebas Neue (for bold headings)
 * - Accent: Kotta One (for subheadings)
 */

/* ========================================
   Google Fonts Import
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Bebas+Neue&family=Kotta+One&display=swap');

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
    /* Brand Colors */
    --exact-primary: #FE5000;
    --exact-primary-dark: #D94400;
    --exact-primary-light: #FF7A33;

    /* Neutral Colors */
    --exact-white: #FFFFFF;
    --exact-black: #000000;
    --exact-gray-50: #F9FAFB;
    --exact-gray-100: #F3F4F6;
    --exact-gray-200: #E5E7EB;
    --exact-gray-300: #D1D5DB;
    --exact-gray-400: #9CA3AF;
    --exact-gray-500: #6B7280;
    --exact-gray-600: #4B5563;
    --exact-gray-700: #374151;
    --exact-gray-800: #1F2937;
    --exact-gray-900: #111827;

    /* Semantic Colors */
    --exact-success: #10B981;
    --exact-success-light: #D1FAE5;
    --exact-warning: #F59E0B;
    --exact-warning-light: #FEF3C7;
    --exact-danger: #EF4444;
    --exact-danger-light: #FEE2E2;
    --exact-info: #3B82F6;
    --exact-info-light: #DBEAFE;

    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Bebas Neue', cursive;
    --font-accent: 'Kotta One', serif;

    /* Font Sizes */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */

    /* Spacing Scale */
    --space-1: 0.25rem;      /* 4px */
    --space-2: 0.5rem;       /* 8px */
    --space-3: 0.75rem;      /* 12px */
    --space-4: 1rem;         /* 16px */
    --space-5: 1.25rem;      /* 20px */
    --space-6: 1.5rem;       /* 24px */
    --space-8: 2rem;         /* 32px */
    --space-10: 2.5rem;      /* 40px */
    --space-12: 3rem;        /* 48px */
    --space-16: 4rem;        /* 64px */

    /* Border Radius */
    --radius-sm: 0.25rem;    /* 4px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Component Sizes */
    --status-icon-size: 60px;
    --profile-picture-max-height: 300px;
}

/* ========================================
   Base Styles & Typography
   ======================================== */
#camperinfo-updated-wrapper {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--exact-gray-800);
}

#camperinfo-updated-wrapper h1,
#camperinfo-updated-wrapper h2,
#camperinfo-updated-wrapper h3,
#camperinfo-updated-wrapper h4,
#camperinfo-updated-wrapper h5,
#camperinfo-updated-wrapper h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--exact-gray-900);
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

#camperinfo-updated-wrapper h1 {
    font-size: var(--text-5xl);
}

#camperinfo-updated-wrapper h2 {
    font-size: var(--text-4xl);
}

#camperinfo-updated-wrapper h3 {
    font-size: var(--text-3xl);
}

#camperinfo-updated-wrapper h4 {
    font-size: var(--text-2xl);
}

#camperinfo-updated-wrapper p {
    margin-bottom: var(--space-4);
}

#camperinfo-updated-wrapper label {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--exact-gray-700);
    margin-bottom: var(--space-2);
    display: inline-block;
}

/* ========================================
   Card Styles
   ======================================== */
#camperinfo-updated-wrapper .card {
    background: var(--exact-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--exact-gray-200);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: var(--space-6);
    transition: box-shadow var(--transition-base);
}

#camperinfo-updated-wrapper .card:hover {
    box-shadow: var(--shadow-xl);
}

#camperinfo-updated-wrapper .card-header {
    background: linear-gradient(135deg, var(--exact-primary) 0%, var(--exact-primary-dark) 100%);
    color: var(--exact-white);
    padding: var(--space-6) var(--space-8);
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
}

#camperinfo-updated-wrapper .card-body {
    padding: var(--space-8);
}

/* ========================================
   Alert Styles
   ======================================== */
#camperinfo-updated-wrapper .alert {
    border-radius: var(--radius-lg);
    border: none;
    border-left: 4px solid;
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-6);
    font-size: var(--text-sm);
    line-height: 1.6;
    box-shadow: var(--shadow-sm);
}

#camperinfo-updated-wrapper .alert-success {
    background-color: var(--exact-success-light);
    border-left-color: var(--exact-success);
    color: #065F46;
}

#camperinfo-updated-wrapper .alert-warning {
    background-color: var(--exact-warning-light);
    border-left-color: var(--exact-warning);
    color: #92400E;
}

#camperinfo-updated-wrapper .alert-danger {
    background-color: var(--exact-danger-light);
    border-left-color: var(--exact-danger);
    color: #991B1B;
}

#camperinfo-updated-wrapper .alert-info {
    background-color: var(--exact-info-light);
    border-left-color: var(--exact-info);
    color: #1E40AF;
}

#camperinfo-updated-wrapper .alert-secondary {
    background-color: var(--exact-gray-100);
    border-left-color: var(--exact-gray-400);
    color: var(--exact-gray-700);
    font-weight: 500;
}

#camperinfo-updated-wrapper .alert strong {
    font-weight: 700;
    display: block;
    margin-bottom: var(--space-1);
}

/* ========================================
   Button Styles
   ======================================== */
#camperinfo-updated-wrapper .btn {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--text-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

#camperinfo-updated-wrapper .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#camperinfo-updated-wrapper .btn:active {
    transform: translateY(0);
}

#camperinfo-updated-wrapper .btn:disabled,
#camperinfo-updated-wrapper .btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#camperinfo-updated-wrapper .btn-primary {
    background: linear-gradient(135deg, var(--exact-primary) 0%, var(--exact-primary-dark) 100%);
    color: var(--exact-white);
}

#camperinfo-updated-wrapper .btn-primary:hover {
    background: var(--exact-primary-dark);
}

#camperinfo-updated-wrapper .btn-success {
    background-color: var(--exact-success);
    color: var(--exact-white);
}

#camperinfo-updated-wrapper .btn-warning {
    background-color: var(--exact-warning);
    color: var(--exact-white);
}

#camperinfo-updated-wrapper .btn-danger {
    background-color: var(--exact-danger);
    color: var(--exact-white);
}

#camperinfo-updated-wrapper .btn-info {
    background-color: var(--exact-info);
    color: var(--exact-white);
}

#camperinfo-updated-wrapper .btn-secondary {
    background-color: var(--exact-gray-200);
    color: var(--exact-gray-800);
}

#camperinfo-updated-wrapper .btn-block {
    display: flex;
    width: 100%;
}

#camperinfo-updated-wrapper .btn-lg {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-lg);
}

#camperinfo-updated-wrapper .btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

/* ========================================
   Form Input Styles
   ======================================== */
#camperinfo-updated-wrapper .form-control,
#camperinfo-updated-wrapper .form-control-sm {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--exact-gray-300);
    border-radius: var(--radius-md);
    background-color: var(--exact-white);
    color: var(--exact-gray-900);
    transition: all var(--transition-fast);
    width: 100%;
}

#camperinfo-updated-wrapper .form-control:focus,
#camperinfo-updated-wrapper .form-control-sm:focus {
    outline: none;
    border-color: var(--exact-primary);
    box-shadow: 0 0 0 3px rgba(254, 80, 0, 0.1);
}

#camperinfo-updated-wrapper .form-control:disabled,
#camperinfo-updated-wrapper .form-control-sm:disabled {
    background-color: var(--exact-gray-100);
    cursor: not-allowed;
    opacity: 0.7;
}

#camperinfo-updated-wrapper .form-control::placeholder {
    color: var(--exact-gray-400);
}

#camperinfo-updated-wrapper select.form-control,
#camperinfo-updated-wrapper select.form-control-sm {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right var(--space-3) center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: var(--space-10);
    min-height: 48px;
    line-height: 1.5;
}

#camperinfo-updated-wrapper textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

#camperinfo-updated-wrapper .form-control-file {
    padding: var(--space-3);
    border: 2px dashed var(--exact-gray-300);
    border-radius: var(--radius-md);
    background-color: var(--exact-gray-50);
    cursor: pointer;
    transition: all var(--transition-fast);
}

#camperinfo-updated-wrapper .form-control-file:hover {
    border-color: var(--exact-primary);
    background-color: rgba(254, 80, 0, 0.05);
}

#camperinfo-updated-wrapper .form-group {
    margin-bottom: var(--space-6);
}

/* Required field indicator */
#camperinfo-updated-wrapper .red {
    color: var(--exact-danger);
    font-weight: 700;
}

/* ========================================
   Section Styles
   ======================================== */
#camperinfo-updated-wrapper .row {
    margin-bottom: var(--space-6);
}

#camperinfo-updated-wrapper hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--exact-gray-300), transparent);
    margin: var(--space-10) 0;
}

/* Section headers with left accent */
#camperinfo-updated-wrapper h3 {
    position: relative;
    padding-left: var(--space-4);
}

#camperinfo-updated-wrapper h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--exact-primary), var(--exact-primary-dark));
    border-radius: var(--radius-sm);
}

/* ========================================
   Image Upload & Preview Styles
   ======================================== */
#camperinfo-updated-wrapper .img-thumbnail {
    border-radius: var(--radius-lg);
    border: 3px solid var(--exact-gray-200);
    padding: var(--space-2);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

#camperinfo-updated-wrapper .img-thumbnail:hover {
    border-color: var(--exact-primary);
    box-shadow: var(--shadow-lg);
}

#camperinfo-updated-wrapper #image-preview,
#camperinfo-updated-wrapper #x1-preview {
    border-radius: var(--radius-xl);
    max-width: 100%;
    height: auto;
}

#camperinfo-updated-wrapper .center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

/* ========================================
   Utility Classes
   ======================================== */
#camperinfo-updated-wrapper .hide {
    display: none !important;
}

#camperinfo-updated-wrapper .pt-4 {
    padding-top: var(--space-8);
}

#camperinfo-updated-wrapper .pull-left {
    float: left;
}

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

/* Tablet and below */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;     /* 36px */
        --text-4xl: 1.875rem;    /* 30px */
        --text-3xl: 1.5rem;      /* 24px */
    }

    #camperinfo-updated-wrapper .card-body {
        padding: var(--space-6);
    }

    #camperinfo-updated-wrapper .card-header {
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-xl);
    }

    #camperinfo-updated-wrapper .btn {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-sm);
    }

    #camperinfo-updated-wrapper .btn-lg {
        padding: var(--space-4) var(--space-8);
        font-size: var(--text-base);
    }

    #camperinfo-updated-wrapper .row {
        margin-bottom: var(--space-4);
    }

    #camperinfo-updated-wrapper .form-group {
        margin-bottom: var(--space-4);
    }

    #camperinfo-updated-wrapper .col-md-6,
    #camperinfo-updated-wrapper .col-md-4,
    #camperinfo-updated-wrapper .col-md-3 {
        margin-bottom: var(--space-4);
    }
}

/* Mobile */
@media (max-width: 480px) {
    :root {
        --text-5xl: 1.875rem;    /* 30px */
        --text-4xl: 1.5rem;      /* 24px */
        --text-3xl: 1.25rem;     /* 20px */
    }

    #camperinfo-updated-wrapper .card-body {
        padding: var(--space-4);
    }

    #camperinfo-updated-wrapper .card-header {
        padding: var(--space-3) var(--space-4);
    }

    #camperinfo-updated-wrapper .btn {
        font-size: var(--text-xs);
        padding: var(--space-2) var(--space-4);
    }

    #camperinfo-updated-wrapper .alert {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-xs);
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #camperinfo-updated-wrapper .btn {
        display: none;
    }

    #camperinfo-updated-wrapper .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ========================================
   Profile Section Two-Column Layout
   ======================================== */
#camperinfo-updated-wrapper .profile-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
    align-items: start;
}

#camperinfo-updated-wrapper .profile-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
}

#camperinfo-updated-wrapper .profile-left .col-md-12 {
    margin-bottom: 0;
    padding: 0;
    width: 100%;
}

#camperinfo-updated-wrapper .profile-right {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

#camperinfo-updated-wrapper .profile-right .form-group {
    margin-bottom: var(--space-3);
}

@media (max-width: 768px) {
    #camperinfo-updated-wrapper .profile-section {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Completion Percentage
   ======================================== */
#camperinfo-updated-wrapper .completion-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--exact-primary);
    margin-right: var(--space-4);
}

/* ========================================
   Status Display Section
   ======================================== */
#camperinfo-updated-wrapper .status-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
}

#camperinfo-updated-wrapper .status-card {
    background: var(--exact-white);
    border: 2px solid var(--exact-gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    will-change: transform;
}

#camperinfo-updated-wrapper .status-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

#camperinfo-updated-wrapper .status-card-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    text-transform: uppercase;
    color: var(--exact-gray-900);
    text-align: center;
    letter-spacing: 0.05em;
}

#camperinfo-updated-wrapper .status-icon {
    width: var(--status-icon-size);
    height: var(--status-icon-size);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-4xl);
}

#camperinfo-updated-wrapper .status-icon.active {
    background-color: var(--exact-success-light);
    color: var(--exact-success);
}

#camperinfo-updated-wrapper .status-icon.inactive {
    background-color: var(--exact-danger-light);
    color: var(--exact-danger);
}

#camperinfo-updated-wrapper .status-text {
    font-size: var(--text-sm);
    color: var(--exact-gray-600);
    text-align: center;
    font-family: var(--font-primary);
    text-transform: none;
}

#camperinfo-updated-wrapper .status-text a {
    color: var(--exact-primary);
    text-decoration: none;
    font-weight: 600;
}

#camperinfo-updated-wrapper .status-text a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    #camperinfo-updated-wrapper .status-section {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   X1 Badge Styling
   ======================================== */
#camperinfo-updated-wrapper .x1-badge {
    background-color: #FE5000;
    color: #000000;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9em;
    display: inline-block;
    line-height: 1.4;
    vertical-align: middle;
}

#camperinfo-updated-wrapper .x1-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

#camperinfo-updated-wrapper .verification-helper-text {
    font-size: var(--text-sm);
    color: #1E40AF;
    font-weight: 400;
    margin-top: var(--space-2);
    width: 100%;
}

#camperinfo-updated-wrapper #x1-confirmed {
    white-space: nowrap;
    overflow-wrap: normal;
}

@media (max-width: 768px) {
    #camperinfo-updated-wrapper #x1-confirmed {
        white-space: normal;
    }
}

/* ========================================
   Accessibility
   ======================================== */
#camperinfo-updated-wrapper *:focus-visible {
    outline: 3px solid var(--exact-primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    #camperinfo-updated-wrapper * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
