/* Elegant Loader CSS */

/* Preloader Global */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 9999;
}

#status {
    width: 80px;
    height: 80px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -40px 0 0 -40px;
}

.spinner-chase {
    margin: 0 auto;
    width: 70px;
    height: 70px;
    position: relative;
    animation: spinner-chase 2.5s infinite linear both;
}

.chase-dot {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0; 
    animation: chase-dot 2.0s infinite ease-in-out both; 
}

.chase-dot:before {
    content: '';
    display: block;
    width: 25%;
    height: 25%;
    background-color: #556ee6;
    border-radius: 100%;
    animation: chase-dot-before 2.0s infinite ease-in-out both; 
}

.chase-dot:nth-child(1) { animation-delay: -1.1s; }
.chase-dot:nth-child(2) { animation-delay: -1.0s; }
.chase-dot:nth-child(3) { animation-delay: -0.9s; }
.chase-dot:nth-child(4) { animation-delay: -0.8s; }
.chase-dot:nth-child(5) { animation-delay: -0.7s; }
.chase-dot:nth-child(6) { animation-delay: -0.6s; }
.chase-dot:nth-child(1):before { animation-delay: -1.1s; }
.chase-dot:nth-child(2):before { animation-delay: -1.0s; }
.chase-dot:nth-child(3):before { animation-delay: -0.9s; }
.chase-dot:nth-child(4):before { animation-delay: -0.8s; }
.chase-dot:nth-child(5):before { animation-delay: -0.7s; }
.chase-dot:nth-child(6):before { animation-delay: -0.6s; }

@keyframes spinner-chase {
    100% { transform: rotate(360deg); } 
}

@keyframes chase-dot {
    80%, 100% { transform: rotate(360deg); } 
}

@keyframes chase-dot-before {
    50% {
        transform: scale(0.4); 
    } 100%, 0% {
        transform: scale(1.0); 
    } 
}

/* Page Loader Wrapper */
.page-loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.page-loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    text-align: center;
}

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

.loader-spinner .dot {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    animation: loader-spin 2s infinite ease-in-out both;
}

.loader-spinner .dot:before {
    content: '';
    display: block;
    width: 25%;
    height: 25%;
    background-color: #556ee6;
    border-radius: 100%;
    animation: loader-dot 2s infinite ease-in-out both;
    box-shadow: 0 0 10px rgba(85, 110, 230, 0.5);
}

.loader-spinner .dot:nth-child(1) {
    animation-delay: -1.1s;
}

.loader-spinner .dot:nth-child(2) {
    animation-delay: -1.0s;
}

.loader-spinner .dot:nth-child(3) {
    animation-delay: -0.9s;
}

.loader-spinner .dot:nth-child(4) {
    animation-delay: -0.8s;
}

.loader-spinner .dot:nth-child(5) {
    animation-delay: -0.7s;
}

.loader-spinner .dot:nth-child(6) {
    animation-delay: -0.6s;
}

.loader-spinner .dot:nth-child(1):before {
    animation-delay: -1.1s;
}

.loader-spinner .dot:nth-child(2):before {
    animation-delay: -1.0s;
}

.loader-spinner .dot:nth-child(3):before {
    animation-delay: -0.9s;
}

.loader-spinner .dot:nth-child(4):before {
    animation-delay: -0.8s;
}

.loader-spinner .dot:nth-child(5):before {
    animation-delay: -0.7s;
}

.loader-spinner .dot:nth-child(6):before {
    animation-delay: -0.6s;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(85, 110, 230, 0.2);
    margin: 15px auto 10px;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loader-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #556ee6;
    animation: loader-progress 1.5s infinite ease-in-out;
    border-radius: 2px;
}

.loader-text {
    color: #495057;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

/* Content Loader */
.content-loader {
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

/* Animations */
@keyframes loader-spin {
    100% { transform: rotate(360deg); }
}

@keyframes loader-dot {
    0%, 100% { transform: scale(0.2); }
    50% { transform: scale(1); }
}

@keyframes loader-progress {
    0% { width: 0%; left: 0; }
    50% { width: 70%; }
    100% { width: 0%; left: 100%; }
}

/* Pulse effect for menu items */
.nav-link.active-loading {
    position: relative;
    overflow: hidden;
}

.nav-link.active-loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(85, 110, 230, 0.2);
    animation: pulse-animation 1.5s infinite;
    border-radius: 4px;
    z-index: -1;
}

@keyframes pulse-animation {
    0% { opacity: 0.6; }
    50% { opacity: 0.2; }
    100% { opacity: 0.6; }
}

/* Login Page Animations */
.fade-in-animation {
    animation: fadeIn 0.8s ease-in-out;
}

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

.card-animation {
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-animation:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.form-control-animation {
    transition: all 0.3s ease;
    border: 1px solid #ced4da;
}

.form-control-animation:focus {
    border-color: #556ee6;
    box-shadow: 0 0 0 0.15rem rgba(85, 110, 230, 0.25);
    transform: translateY(-2px);
}

.btn-animation {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animation:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(85, 110, 230, 0.3);
}

.btn-animation:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.btn-animation:hover:before {
    left: 100%;
}