/* =========================================================
   LEGACY TREK - MAIN STYLESHEET
   Consolidated styles for consistent UI across the platform
   ========================================================= */

/* --- CSS VARIABLES --- */
:root {
    --lt-primary: #1e3a5f;
    --lt-primary-dark: #0f1f33;
    --lt-gold: #FFD700;
    --lt-success: #198754;
    --lt-success-dark: #146c43;
    --lt-orange: #fd7e14;
    --lt-purple: #6f42c1;
    --lt-teal: #008080;
    --lt-junior: #20c997;
    --lt-navy: #1e3a8a;
    --lt-gray: #6c757d;
    --lt-bg: #f4f1ea;
    --lt-card-shadow: 0 4px 15px rgba(0,0,0,0.1);
    --lt-font-display: 'Fredericka the Great', cursive;
    --lt-font-heading: 'Golos Text', sans-serif;
    --lt-font-body: 'Newsreader', serif;
}

/* --- TYPOGRAPHY --- */
body {
    font-family: var(--lt-font-body);
    font-size: 1.1rem;
    background-color: var(--lt-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--lt-font-display);
}

.lt-heading {
    font-family: var(--lt-font-display);
    color: var(--lt-primary);
}

/* --- CARDS --- */
.lt-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--lt-card-shadow);
    border: none;
}

.lt-card-header {
    background: linear-gradient(135deg, var(--lt-primary), var(--lt-primary-dark));
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 20px;
}

/* --- BUTTONS --- */
.btn-lt-primary {
    background: linear-gradient(135deg, var(--lt-primary), var(--lt-primary-dark));
    color: white;
    border: none;
    font-family: var(--lt-font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-lt-primary:hover {
    background: linear-gradient(135deg, var(--lt-primary-dark), #0a1520);
    color: white;
}

.btn-lt-success {
    background: linear-gradient(135deg, var(--lt-success), var(--lt-success-dark));
    color: white;
    border: none;
}

.btn-lt-success:hover {
    background: linear-gradient(135deg, var(--lt-success-dark), #0f5132);
    color: white;
}

.btn-lt-gold {
    background: var(--lt-gold);
    color: var(--lt-primary);
    font-weight: bold;
}

.btn-lt-gold:hover {
    background: #e6c200;
    color: var(--lt-primary-dark);
}

/* --- LOADING STATES --- */
.lt-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.lt-loading-spinner {
    width: 4rem;
    height: 4rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--lt-gold);
    border-radius: 50%;
    animation: lt-spin 1s linear infinite;
}

@keyframes lt-spin {
    to { transform: rotate(360deg); }
}

.lt-loading-text {
    font-family: var(--lt-font-display);
    font-size: 1.4rem;
    margin-top: 20px;
    text-align: center;
}

.lt-loading-subtext {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Trail animation for Junior Trekker */
.lt-loading-trail {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.lt-loading-trail .dot {
    width: 10px;
    height: 10px;
    background: var(--lt-junior);
    border-radius: 50%;
    animation: lt-trail 1.4s ease-in-out infinite;
}

.lt-loading-trail .dot:nth-child(2) { animation-delay: 0.2s; }
.lt-loading-trail .dot:nth-child(3) { animation-delay: 0.4s; }
.lt-loading-trail .dot:nth-child(4) { animation-delay: 0.6s; }
.lt-loading-trail .dot:nth-child(5) { animation-delay: 0.8s; }

@keyframes lt-trail {
    0%, 100% { transform: scale(0.5); opacity: 0.5; }
    50% { transform: scale(1); opacity: 1; }
}

/* --- ALERTS --- */
.lt-alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
}

.lt-alert-success {
    background: rgba(25, 135, 84, 0.1);
    border-left: 4px solid var(--lt-success);
    color: var(--lt-success-dark);
}

.lt-alert-warning {
    background: rgba(253, 126, 20, 0.1);
    border-left: 4px solid var(--lt-orange);
    color: #975a16;
}

.lt-alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
    color: #842029;
}

/* --- PROGRESS INDICATORS --- */
.lt-progress-dots {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.lt-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    transition: all 0.3s ease;
}

.lt-progress-dot.active {
    background: var(--lt-success);
    transform: scale(1.3);
}

.lt-progress-dot.completed {
    background: var(--lt-success);
}

/* --- FORM STYLES --- */
.lt-form-control {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 15px;
    transition: border-color 0.2s ease;
}

.lt-form-control:focus {
    border-color: var(--lt-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
    outline: none;
}

/* --- ANIMATIONS --- */
.lt-fade-in {
    animation: ltFadeIn 0.5s ease;
}

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

.lt-pulse {
    animation: ltPulse 2s ease-in-out infinite;
}

@keyframes ltPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* --- UTILITY CLASSES --- */
.lt-text-gold { color: var(--lt-gold); }
.lt-text-primary { color: var(--lt-primary); }
.lt-text-success { color: var(--lt-success); }
.lt-bg-primary { background-color: var(--lt-primary); }
.lt-bg-gradient { background: linear-gradient(135deg, var(--lt-primary), var(--lt-primary-dark)); }

/* --- THEME COLORS --- */
.lt-theme-history { --lt-theme: var(--lt-orange); }
.lt-theme-roots { --lt-theme: var(--lt-success); }
.lt-theme-junior { --lt-theme: var(--lt-junior); }
.lt-theme-obituary { --lt-theme: var(--lt-navy); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .lt-loading-text {
        font-size: 1.1rem;
        padding: 0 20px;
    }
    
    .lt-loading-spinner {
        width: 3rem;
        height: 3rem;
    }
}
