.matrika-loading-host {
    position: relative;
}

.matrika-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    min-height: 3.5rem;
    border-radius: inherit;
    pointer-events: auto;
}

.matrika-loading-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(250, 250, 249, 0.62);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.dark .matrika-loading-overlay::before {
    background: rgba(12, 10, 9, 0.58);
}

.matrika-loading-overlay__card {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: flex;
    min-width: 10.5rem;
    max-width: min(18rem, calc(100vw - 2rem));
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.9rem 1.2rem 0.85rem;
    border: 1px solid rgba(214, 211, 209, 0.82);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #44403c;
    text-align: center;
    box-shadow: 0 14px 36px rgba(28, 25, 23, 0.14), 0 2px 8px rgba(28, 25, 23, 0.06);
    transform: translate(-50%, -50%);
}

.dark .matrika-loading-overlay__card {
    border-color: rgba(87, 83, 78, 0.8);
    background: rgba(28, 25, 23, 0.94);
    color: #f5f5f4;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34), 0 2px 8px rgba(0, 0, 0, 0.22);
}

.matrika-loading-overlay__logo {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.matrika-loading-overlay__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    min-height: 0.55rem;
}

.matrika-loading-overlay__dots span {
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 999px;
    background: #d97706;
    animation: matrika-loading-pulse 900ms ease-in-out infinite;
}

.matrika-loading-overlay__dots span:nth-child(2) {
    animation-delay: 120ms;
}

.matrika-loading-overlay__dots span:nth-child(3) {
    animation-delay: 240ms;
}

.matrika-loading-overlay__text {
    color: #78716c;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.25;
}

.dark .matrika-loading-overlay__text {
    color: #a8a29e;
}

@keyframes matrika-loading-pulse {
    0%, 60%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .matrika-loading-overlay__dots span {
        animation: none;
        opacity: 0.65;
    }
}
