/* CUUD Preloader — styles */

#cuud-preloader.cuud-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: all;
}

#cuud-preloader.cuud-preloader.is-hiding {
    opacity: 0;
    pointer-events: none;
}

#cuud-preloader.cuud-preloader.is-hidden {
    display: none !important;
}

.cuud-preloader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    margin: 0;
    box-sizing: border-box;
}

.cuud-preloader__inner * {
    box-sizing: border-box;
}

/* SVG spinner - twardy reset przed stylami motywu */
.cuud-spinner {
    width: 140px !important;
    height: 140px !important;
    display: block;
    margin: 0 auto 24px;
    overflow: visible;
}

.cuud-spinner circle {
    transform-origin: center;
    transform-box: view-box;
}

/* Animacja obracania całego SVG */
.cuud-spinner {
    animation: cuud-rotate 2.2s linear infinite;
    transform-origin: center;
}

/* Łuki - bez własnych transformacji obrotowych, tylko pulsowanie */
.cuud-arc--yellow {
    animation: cuud-arc-pulse 1.6s ease-in-out infinite;
}

.cuud-arc--navy {
    animation: cuud-arc-pulse 1.6s ease-in-out infinite 0.2s;
}

.cuud-arc--blue {
    animation: cuud-arc-pulse 1.6s ease-in-out infinite 0.4s;
}

.cuud-arc--darkblue {
    animation: cuud-arc-pulse 1.6s ease-in-out infinite 0.6s;
}

.cuud-arc-inner {
    animation: cuud-rotate-reverse 1.8s linear infinite;
}

@keyframes cuud-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes cuud-rotate-reverse {
    from { transform: rotate(360deg); }
    to   { transform: rotate(0deg); }
}

@keyframes cuud-arc-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Tekst pod spinnerem */
.cuud-preloader__text {
    color: #0a1832;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 8px;
    line-height: 1;
}

.cuud-preloader__text sup {
    font-size: 12px;
    font-weight: 400;
    margin-left: 2px;
    vertical-align: super;
}

.cuud-preloader__subtext {
    color: #0a1832;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.85;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.6;
    text-align: center;
}

.cuud-preloader__subtext span {
    display: block;
}

/* Własny tekst */
.cuud-preloader__custom {
    color: #0a1832;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.5;
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
}

/* Napis NAD spinnerem */
.cuud-preloader__toptext {
    color: #0a1832;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.5;
    text-align: center;
    max-width: 280px;
    margin: 0 auto 28px;
}

/* Tryb bez animacji — spinner statyczny */
.cuud-preloader--no-animation .cuud-spinner,
.cuud-preloader--no-animation .cuud-arc,
.cuud-preloader--no-animation .cuud-arc-inner {
    animation: none !important;
}

/* Tryb bez spinnera — sam tekst (dla pewności, render i tak go pomija) */
.cuud-preloader--no-spinner .cuud-spinner {
    display: none !important;
}

/* Screen-reader only */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cuud-spinner,
    .cuud-arc,
    .cuud-arc-inner {
        animation-duration: 4s !important;
    }
}

/* Drobne dostosowanie na bardzo małych ekranach */
@media (max-width: 360px) {
    .cuud-spinner {
        width: 110px;
        height: 110px;
    }
    .cuud-preloader__text {
        font-size: 22px;
    }
}
