/* Loader de marca + splash de boas-vindas (Opinor / BarberBI) */

#opinor-brand-loader,
#opinor-brand-splash {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: Montserrat, Inter, Segoe UI, sans-serif;
    -webkit-font-smoothing: antialiased;
}

#opinor-brand-loader {
    background: rgba(250, 248, 245, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

#opinor-brand-loader.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

#opinor-brand-splash {
    background:
        radial-gradient(ellipse at 50% 35%, rgba(232, 150, 12, 0.18), transparent 55%),
        linear-gradient(160deg, #faf8f5 0%, #f3ece3 55%, #ebe3d6 100%);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

#opinor-brand-splash.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.opinor-brand-loader-card,
.opinor-brand-splash-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    max-width: 360px;
}

.opinor-brand-logo-wrap {
    position: relative;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opinor-brand-splash .opinor-brand-logo-wrap {
    width: 168px;
    height: 168px;
}

.opinor-brand-logo-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent-color, #E8960C);
    border-right-color: rgba(62, 42, 26, 0.25);
    animation: opinor-brand-spin 1.05s linear infinite;
}

.opinor-brand-splash .opinor-brand-logo-ring {
    inset: -14px;
    border-width: 3px;
    animation-duration: 1.35s;
}

.opinor-brand-logo-img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    filter: drop-shadow(0 10px 22px rgba(62, 42, 26, 0.22));
    animation: opinor-brand-breathe 1.6s ease-in-out infinite;
}

.opinor-brand-splash .opinor-brand-logo-img {
    width: 78%;
    height: 78%;
    animation: opinor-brand-greet 1.8s ease-in-out infinite;
}

.opinor-brand-loader-label {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary-color, #3E2A1A);
}

.opinor-brand-splash-title {
    margin: 8px 0 0;
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary-color, #3E2A1A);
    line-height: 1.2;
}

.opinor-brand-splash-sub {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b6358;
    line-height: 1.45;
}

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

@keyframes opinor-brand-breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.92; }
}

@keyframes opinor-brand-greet {
    0%, 100% { transform: scale(1) translateY(0); }
    40% { transform: scale(1.07) translateY(-6px); }
    70% { transform: scale(1.02) translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
    .opinor-brand-logo-ring,
    .opinor-brand-logo-img {
        animation: none !important;
    }
}
