/**
 * Hall of Flags Registration System - Custom Styles
 * Only HOF-specific styles that Bootstrap 5.3 doesn't provide
 * Mobile-First Responsive Design
 */

/* ====================================
   HOF-SPECIFIC CSS VARIABLES
   ==================================== */
:root {
    --hof-morning-slot: #3d8eb9;
    --hof-afternoon-slot: #f1c40f;
    --hof-transition-speed: 0.3s;
    --hof-transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====================================
   HOF PAGE LAYOUT
   ==================================== */
.important-heading {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s var(--hof-transition-easing);
}

.info-container {
    animation: fadeIn 0.8s var(--hof-transition-easing);
}

.highlight {
    font-weight: 600;
}

/* ====================================
   FLATPICKR CALENDAR CUSTOMIZATION
   ==================================== */
.flatpickr-calendar {
    box-shadow: var(--bs-box-shadow-lg) !important;
    border-radius: var(--bs-border-radius) !important;
    border: 1px solid var(--bs-border-color) !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.flatpickr-day:hover {
    background: rgba(var(--bs-primary-rgb), 0.1) !important;
}

/* Calendar availability indicator dots */
.event {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    bottom: 3px;
    left: calc(50% - 3px);
    display: inline-block;
    transition: all var(--hof-transition-speed) var(--hof-transition-easing);
}

.event.morning {
    background: var(--hof-morning-slot);
    left: calc(50% - 8px);
}

.event.afternoon {
    background: var(--hof-afternoon-slot);
    left: calc(50% + 2px);
}

/* Calendar key legend */
.calendar-key .fa-circle {
    margin-right: 0.5rem;
    transition: transform var(--hof-transition-speed) var(--hof-transition-easing);
}

.calendar-key .fa-circle:hover {
    transform: scale(1.2);
}

/* ====================================
   TIMER COMPONENT
   ==================================== */
.timer-card {
    transition: all var(--hof-transition-speed) var(--hof-transition-easing);
}

.timer-active {
    animation: pulse 2s infinite;
}

.timer-warning {
    background-color: var(--bs-warning) !important;
    color: #000 !important;
}

.timer-critical {
    background-color: var(--bs-danger) !important;
    animation: shake 0.5s infinite;
}

.timer-expired {
    background-color: var(--bs-secondary) !important;
    opacity: 0.7;
}

#timer1 {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
}

/* ====================================
   TIME SLOT SELECTION STATES
   ==================================== */
.form-step {
    transition: all var(--hof-transition-speed) var(--hof-transition-easing);
}

/* Enhanced form-check for slot selection */
.time-slot-options .form-check {
    padding: 1rem 1rem 1rem 2.5rem;
    margin-bottom: 0.75rem;
    border: 2px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    cursor: pointer;
    transition: all var(--hof-transition-speed) var(--hof-transition-easing);
    position: relative;
}

.time-slot-options .form-check:hover:not(.slot-unavailable) {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    transform: translateX(5px);
}

.time-slot-options .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

.time-slot-options .form-check-label {
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    flex: 1;
    margin-left: 0.5rem;
}

/* Slot availability states */
.slot-available {
    background-color: rgba(var(--bs-success-rgb), 0.05);
}

.slot-unavailable {
    background-color: rgba(var(--bs-secondary-rgb), 0.05);
    opacity: 0.6;
    cursor: not-allowed;
}

.slot-selected {
    border-color: var(--bs-success) !important;
    background-color: rgba(var(--bs-success-rgb), 0.1) !important;
    box-shadow: var(--bs-box-shadow);
}

.slot-locked-out {
    opacity: 0.4;
    pointer-events: none;
}

/* Availability badges */
.availability-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin-left: auto;
    transition: all var(--hof-transition-speed) var(--hof-transition-easing);
}

/* ====================================
   FORM ENHANCEMENTS
   ==================================== */
.form-group .fa-asterisk {
    font-size: 0.5rem;
    vertical-align: super;
    margin-left: 0.25rem;
}

/* ====================================
   LOADING STATE
   ==================================== */
.hof-loading {
    cursor: wait;
    pointer-events: none;
}

.hof-loading::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9998;
}

/* ====================================
   ANIMATIONS
   ==================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.4s var(--hof-transition-easing);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--bs-danger-rgb), 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(var(--bs-danger-rgb), 0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ====================================
   RESPONSIVE ADJUSTMENTS
   ==================================== */
@media (min-width: 768px) {
    #timer1 {
        font-size: 2.5rem;
    }

    .time-slot-options .form-check {
        padding: 1.25rem 1.25rem 1.25rem 3rem;
    }

    .time-slot-options .form-check-label {
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .important-heading {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    /* Stack timer and calendar key on mobile */
    .timer-card,
    .calendar-key {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem;
    }

    #timer1 {
        font-size: 1.75rem;
    }

    .time-slot-options .form-check {
        padding: 0.75rem 0.75rem 0.75rem 2.25rem;
    }

    .time-slot-options .form-check-input {
        left: 0.75rem;
    }

    .time-slot-options .form-check-label {
        font-size: 1rem;
    }
}

@media (max-width: 575px) {
    #timer1 {
        font-size: 1.5rem;
    }

    .availability-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ====================================
   ACCESSIBILITY
   ==================================== */
@media (prefers-contrast: high) {
    .time-slot-options .form-check {
        border-width: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ====================================
   DARK MODE
   ==================================== */
[data-bs-theme="dark"] .hof-loading::after {
    background: rgba(0, 0, 0, 0.8);
}
