.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background-color: transparent; /* фон задается модификаторами */
}

.loader-overlay-global {
    position: fixed;
    background-color: rgba(29, 37, 45, 0.5);
}

.loader-overlay-local {
    position: absolute;
}

.loader-overlay-transparent { background-color: transparent; }
.loader-overlay-semi { background-color: rgba(255, 255, 255, 0.6); }

.loader-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-message { display: none; }

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--hm-light);
    border-top: 3px solid var(--hm-yellow);
    border-radius: 50%;
    animation: loader-spin 1s linear infinite;
}

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

.loader-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.loader-dot {
    width: 12px;
    height: 12px;
    background-color: var(--hm-yellow);
    border-radius: 50%;
    animation: loader-dot-bounce 1.4s ease-in-out infinite both;
}

.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }
.loader-dot:nth-child(3) { animation-delay: 0s; }

@keyframes loader-dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loader-bars {
    display: flex;
    gap: 4px;
    align-items: end;
    height: 40px;
}

.loader-bar {
    width: 8px;
    background-color: var(--hm-yellow);
    animation: loader-bar-stretch 1.2s infinite ease-in-out;
}

.loader-bar:nth-child(1) { animation-delay: -1.1s; }
.loader-bar:nth-child(2) { animation-delay: -1.0s; }
.loader-bar:nth-child(3) { animation-delay: -0.9s; }
.loader-bar:nth-child(4) { animation-delay: -0.8s; }

@keyframes loader-bar-stretch {
    0%, 40%, 100% {
        height: 10px;
    }
    20% {
        height: 40px;
    }
}
