/* ========================================
   Loading Modal Styles
   ======================================== */

/* Modal Backdrop */
.loading-modal-backdrop {
    backdrop-filter: blur(8px);
}

/* Modal Content */
.loading-modal-content {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
}

/* Loading Container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 250px;
}

/* Spinner Ring Container */
.spinner-ring-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Animated Ring */
.spinner-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-top-color: #386593;
    border-right-color: #386593;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    border-bottom-color: #5893c5;
    border-left-color: #5893c5;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin-reverse 1.5s linear infinite;
}

/* Central Icon with Pulse */
.loading-icon {
    position: relative;
    z-index: 10;
    font-size: 2.5rem;
    color: #386593;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Spin Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Reverse Spin */
@keyframes spin-reverse {
    to {
        transform: rotate(-360deg);
    }
}

/* Loading Text */
.loading-title {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.5px;
}

.loading-text {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

/* Animated Dots */
.loading-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 0.5rem;
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #386593;
    animation: dot-bounce 1.4s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-bounce {
    0%, 80%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

/* Dark Theme */
[data-bs-theme="dark"] .loading-modal-content {
    background: rgba(42, 42, 42, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .spinner-ring {
    border-top-color: #5893c5;
    border-right-color: #5893c5;
}

[data-bs-theme="dark"] .spinner-ring::after {
    border-bottom-color: #386593;
    border-left-color: #386593;
}

[data-bs-theme="dark"] .loading-icon {
    color: #5893c5;
}

[data-bs-theme="dark"] .loading-title {
    color: #F5F5F5;
}

[data-bs-theme="dark"] .loading-text {
    color: #BDBDBD;
}

[data-bs-theme="dark"] .dot {
    background-color: #5893c5;
}

/* Responsive */
@media (max-width: 576px) {
    .loading-container {
        padding: 1.5rem;
        min-height: 200px;
    }

    .spinner-ring-container {
        width: 60px;
        height: 60px;
    }

    .spinner-ring {
        width: 60px;
        height: 60px;
    }

    .spinner-ring::after {
        width: 45px;
        height: 45px;
    }

    .loading-icon {
        font-size: 2rem;
    }

    .loading-title {
        font-size: 1.1rem;
    }

    .loading-text {
        font-size: 0.85rem;
    }
}
