/* Loading Spinner Styles */
.loading-spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1050;
    transition: opacity 0.3s ease-in-out;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
}

.loading-text {
    font-size: 0.875rem;
    color: #6c757d;
}

.content-loading {
    position: relative;
    min-height: 200px;
}

.content-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.content-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin-top: -1rem;
    margin-left: -1rem;
    border-radius: 50%;
    border: 0.25rem solid rgba(0, 123, 255, 0.25);
    border-top-color: #007bff;
    animation: spinner 1s linear infinite;
    z-index: 2;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .loading-spinner-container {
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .loading-text {
        color: #e2e8f0;
    }
    
    .content-loading::before {
        background-color: rgba(0, 0, 0, 0.8);
    }
}

/* Toast Styles */
.toast-container {
    z-index: 1080;
}

.toast {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
}

/* Button Loading Styles */
.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: calc(50% - 0.5rem);
    left: calc(50% - 0.5rem);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: white;
    animation: button-spinner 0.6s linear infinite;
}

.btn-outline-primary.is-loading::after,
.btn-outline-secondary.is-loading::after {
    border: 2px solid rgba(0, 123, 255, 0.25);
    border-top-color: #007bff;
}

@keyframes button-spinner {
    to {
        transform: rotate(360deg);
    }
}