/**
 * Page Loader Styles
 * Single source of truth for loader appearance and animation.
 * Designed for a fast, elegant reveal with the brand's "i" logo.
 */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-secondary, #635e53);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.page-loader.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    position: relative;
    width: 80px;
    height: 80px;
    animation: loaderFadeIn 0.3s ease-out both;
}

.loader-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(209, 202, 188, 0.15);
    border-top-color: var(--color-tertiary, #d1cabc);
    border-radius: 50%;
    animation: loaderSpin 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.loader-i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    font-family: 'Abadi Extra Light', 'Times New Roman', serif;
    font-weight: 200;
    font-style: italic;
    color: var(--color-tertiary, #d1cabc);
    opacity: 0;
    animation: loaderLetterIn 0.5s 0.15s ease-out forwards;
}

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

@keyframes loaderFadeIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes loaderLetterIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 0.9;
        transform: translate(-50%, -50%);
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .loader-content {
        width: 64px;
        height: 64px;
    }

    .loader-i {
        font-size: 1.75rem;
    }
}
