/**
 * Align Child Theme - Social Login Popup & Processing Overlay Styles
 *
 * Full-screen accessible overlay presenting visual feedback during Google OAuth
 * authentication lifecycle (connecting, verifying, redirecting).
 *
 * @package Align Child
 */

.align-social-auth-overlay[hidden] {
    display: none !important;
}

.align-social-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-sizing: border-box;
}

.align-social-auth-overlay__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 360px;
    box-sizing: border-box;
    padding: 32px 24px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    color: #0f172a;
    text-align: center;
    outline: none;
}

.align-social-auth-overlay__spinner {
    width: 38px;
    height: 38px;
    box-sizing: border-box;
    border: 3.5px solid rgba(173, 26, 36, 0.18);
    border-top-color: #AD1A24;
    border-radius: 50%;
    animation: align-social-auth-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

.align-social-auth-overlay__title {
    display: block;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.04em;
    color: #0f172a;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.align-social-auth-overlay__message {
    display: block;
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.5;
    color: #475569;
    max-width: 280px;
    margin-bottom: 20px;
}

.align-social-auth-overlay__cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 20px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.align-social-auth-overlay__cancel:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.align-social-auth-overlay__cancel:focus-visible {
    outline: 2px solid #AD1A24;
    outline-offset: 2px;
}

/* Hide cancel button when state does not permit cancellation */
.align-social-auth-overlay[data-state="verifying"] .align-social-auth-overlay__cancel,
.align-social-auth-overlay[data-state="redirecting"] .align-social-auth-overlay__cancel {
    display: none !important;
}

/* Adjust card spacing when cancel button is hidden */
.align-social-auth-overlay[data-state="verifying"] .align-social-auth-overlay__message,
.align-social-auth-overlay[data-state="redirecting"] .align-social-auth-overlay__message {
    margin-bottom: 0;
}

/* Processing state for HTML element (scroll lock & wait cursor) */
html.align-social-auth-processing {
    overflow: hidden !important;
}

/* Fluent Security button loading state */
.fs_auth_google.is-loading {
    opacity: 0.75;
    cursor: wait;
    pointer-events: none;
}

@keyframes align-social-auth-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .align-social-auth-overlay__spinner {
        animation: none;
        border-top-color: #AD1A24;
    }
}
