/* Global loading overlay */
.tagpd-loader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(248, 250, 252, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.tagpd-loader.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tagpd-loader__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 100001;
}

.tagpd-loader__logo {
    display: block;
    width: 220px;
    max-width: 78vw;
    height: auto;
    padding: 9px 12px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    animation: tagpd-loader-logo 1.25s ease-in-out infinite;
}

.tagpd-loader__progress-box {
    width: 340px;
    max-width: 88vw;
    margin-top: 18px;
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(226, 232, 240, 0.9);
    animation: tagpd-fade-up 0.22s ease-out;
}

@keyframes tagpd-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes tagpd-loader-logo {
    0%, 100% { transform: translateY(0) rotate(-0.7deg) scale(1); }
    50% { transform: translateY(-9px) rotate(0.7deg) scale(1.025); }
}

@media (max-width: 576px) {
    .tagpd-loader__logo {
        width: 190px;
    }
    .tagpd-loader__progress-box {
        width: 300px;
        padding: 14px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tagpd-loader,
    .tagpd-loader__logo,
    .tagpd-loader__progress-box {
        animation: none;
        transition: none;
    }
}
