.medlog-top-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2147483000;
    height: 3px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.medlog-top-loader.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.medlog-top-loader__bar {
    width: 0%;
    height: 100%;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, #0b57ff 0%, #19a463 58%, #5fd6ff 100%);
    box-shadow: 0 0 18px rgba(11, 87, 255, 0.42);
    transition: width 0.24s cubic-bezier(0.22, 0.82, 0.22, 1);
}

.medlog-action-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147482500;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(10, 25, 49, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.medlog-action-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.medlog-action-overlay__card {
    width: min(330px, 100%);
    padding: 24px 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(179, 207, 229, 0.72);
    box-shadow: 0 28px 70px rgba(10, 25, 49, 0.24);
    text-align: center;
}

.medlog-action-overlay__logo {
    width: 74px;
    height: 74px;
    margin: 0 auto 14px;
    object-fit: contain;
    display: block;
}

.medlog-action-overlay__spinner,
.medlog-btn-spinner {
    border-radius: 999px;
    border: 2px solid rgba(11, 87, 255, 0.2);
    border-top-color: #0b57ff;
    animation: medlogSpin 0.72s linear infinite;
}

.medlog-action-overlay__spinner {
    width: 30px;
    height: 30px;
    margin: 0 auto 12px;
}

.medlog-action-overlay__message {
    margin: 0;
    color: #0a1931;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.medlog-btn-loading {
    position: relative;
    cursor: progress !important;
    opacity: 0.84;
}

.medlog-btn-loading,
.medlog-btn-loading * {
    pointer-events: none;
}

.medlog-btn-spinner {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    display: inline-block;
    margin-right: 0.45em;
    vertical-align: -0.12em;
}

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

@media (prefers-reduced-motion: reduce) {
    .medlog-top-loader,
    .medlog-top-loader__bar,
    .medlog-action-overlay {
        transition: none;
    }

    .medlog-action-overlay__spinner,
    .medlog-btn-spinner {
        animation-duration: 1.4s;
    }
}
