/* App Loader Styles */
.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #284e69 0%, #762D51 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.app-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: rgba(255, 255, 255, 0.6);
    animation-delay: 0.5s;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: rgba(255, 255, 255, 0.4);
    animation-delay: 1s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.loader-text p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Livewire Loading States */
.livewire-loading {
    position: relative;
    pointer-events: none;
}

.livewire-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.livewire-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #284e69;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1001;
}

/* Page Transition Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #f0f0f0;
    z-index: 9998;
}

.page-loader-bar {
    height: 100%;
    background: linear-gradient(90deg, #284e69 0%, #762D51 100%);
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive Loader */
@media (max-width: 768px) {
    .loader-spinner {
        width: 100px;
        height: 100px;
    }
    
    .loader-text h3 {
        font-size: 20px;
    }
    
    .loader-text p {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .loader-spinner {
        width: 80px;
        height: 80px;
    }
    
    .loader-text h3 {
        font-size: 18px;
    }
    
    .loader-text p {
        font-size: 12px;
    }
}

/* Navbar Button Styles - Ensure activate-course buttons work properly */
.menu-top-actions .activate-course {
    display: inline-block !important;
    padding: 10px 24px !important;
    background: #284e69 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    outline: none !important;
    text-align: center !important;
    text-decoration: none !important;
    margin-right: 8px !important;
    line-height: 1.2 !important;
}

.menu-top-actions .activate-course:hover,
.menu-top-actions .activate-course:focus {
    background: #762D51 !important;
    color: #fff !important;
    transform: translateY(-2px) scale(1.04) !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12) !important;
    text-decoration: none !important;
}

.menu-top-actions .activate-course:last-child {
    margin-right: 0 !important;
}

/* Ensure buttons are visible in mobile */
@media (max-width: 768px) {
    .menu-top-actions .activate-course {
        padding: 8px 16px !important;
        font-size: 14px !important;
        margin-bottom: 8px !important;
        width: 100% !important;
        text-align: center !important;
    }
}
