/* ===========================================================
 * Loading Overlay — RotinaPro
 * Logo central com splash/ripple ao redor
 * =========================================================== */

.rp-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: rgba(20, 26, 45, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.rp-loading-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.rp-loading-stage {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-loading-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    z-index: 3;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.25));
    animation: rp-logo-pulse 2.2s ease-in-out infinite;
}

@keyframes rp-logo-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

/* Ripples (splash de água) */
.rp-loading-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    margin: -45px 0 0 -45px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    opacity: 0;
    animation: rp-ripple 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.rp-loading-ripple:nth-child(2) { animation-delay: 0.6s; border-color: rgba(255, 255, 255, 0.7); }
.rp-loading-ripple:nth-child(3) { animation-delay: 1.2s; border-color: rgba(255, 255, 255, 0.55); }
.rp-loading-ripple:nth-child(4) { animation-delay: 1.8s; border-color: rgba(255, 255, 255, 0.4); }

@keyframes rp-ripple {
    0%   { transform: scale(0.5); opacity: 0; border-width: 3px; }
    15%  { opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; border-width: 1px; }
}

/* Ameba — blob suave atrás do logo */
.rp-loading-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.55), rgba(255,255,255,.2) 60%, transparent 75%);
    border-radius: 42% 58% 65% 35% / 40% 55% 45% 60%;
    z-index: 1;
    animation: rp-blob 6s ease-in-out infinite;
    filter: blur(2px);
}

@keyframes rp-blob {
    0%, 100% { border-radius: 42% 58% 65% 35% / 40% 55% 45% 60%; transform: rotate(0deg) scale(1); }
    33%      { border-radius: 58% 42% 35% 65% / 60% 40% 60% 40%; transform: rotate(120deg) scale(1.08); }
    66%      { border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%; transform: rotate(240deg) scale(0.95); }
}

.rp-loading-message {
    margin-top: 18px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 6px rgba(0,0,0,.35);
    min-height: 18px;
    text-align: center;
    max-width: 320px;
}

.rp-loading-dots::after {
    content: '';
    display: inline-block;
    width: 1em;
    text-align: left;
    animation: rp-dots 1.4s steps(4, end) infinite;
}

@keyframes rp-dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}
