/* Loading Animation Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 15, 15, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner div {
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid green;
    border-radius: 50%;
    animation: loading-spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: green transparent transparent transparent;
}

.loading-spinner div:nth-child(1) {
    animation-delay: -0.45s;
}

.loading-spinner div:nth-child(2) {
    animation-delay: -0.3s;
}

.loading-spinner div:nth-child(3) {
    animation-delay: -0.15s;
}

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

.loading-text {
    position: absolute;
    color: white;
    font-size: 16px;
}

/* Inline loading indicators */
.inline-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #888;
}

.inline-spinner {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 3px solid green;
    border-radius: 50%;
    border-top-color: lime;
    animation: inline-spin 1s linear infinite;
}

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

/* Button loading state */
button.loading {
    position: relative;
    pointer-events: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button.loading::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    border-top-color: white;
    animation: button-spin 0.8s linear infinite;
}

button.loading:empty::before {
    margin-right: 0;
}

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