/**
 * assets/css/eafs-int-login.css
 *
 * EAFS Login Integration
 *
 * Login page:
 * - Create Account area
 * - Login Processing Overlay
 *
 * @package EAFSAccountIntegration
 */


/* =========================================================
   LOGIN PAGE
   ========================================================= */

/* EAFS 登录框宽度 */
#eafs-login-container {
    max-width:420px;
    margin:50px auto;
    padding:40px;
    background:#fff;
    border-radius:16px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

/**
 * The WordPress Page content containing:
 *
 * [eafs_login]
 *
 * <div class="eafs-page-signup">...</div>
 *
 * gets some bottom breathing room.
 *
 * This prevents the Login page from touching the
 * bottom edge of the viewport.
 */
.entry-content:has(#eafs-login-container) {
    padding-bottom: 50px;
}


/* =========================================================
   CREATE ACCOUNT IN LOGIN PAGE
   ========================================================= */

/**
 * Signup area.
 *
 * IMPORTANT:
 *
 * The Signup block is NOT inside #eafs-login-container.
 *
 * It is a sibling of #eafs-login-container:
 *
 * .entry-content
 *     ├── #eafs-login-container
 *     └── .eafs-page-signup
 *
 * Therefore we center it independently.
 */
.eafs-page-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

/**
 * Text.
 */
.eafs-page-signup > span {
    display: inline;
    margin: 0;
    padding: 0;
    color: #666;
    text-align: center;
}

/**
 * Create Account link.
 */
.eafs-page-signup-link {
    display: inline;
    margin-left: 5px;
    padding: 0;
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

/**
 * Hover.
 */
.eafs-page-signup-link:hover {
    color: #000;
    text-decoration: underline;
}

/**
 * Keyboard focus.
 */
.eafs-page-signup-link:focus {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

/**
 * Remove possible theme margins.
 */
.eafs-page-signup p {
    margin: 0;
    padding: 0;
}


/* =========================================================
   KEEP SIGNUP CLOSE TO EAFS LOGIN
   ========================================================= */

/**
 * The Login container itself may have a bottom margin
 * coming from EAFS or the theme.
 *
 * Remove that margin so the Signup block can sit close
 * underneath the Login form.
 */
#eafs-login-container {
    margin-bottom: 0 !important;
}

/**
 * Some themes may add margin to the EAFS container.
 *
 * The Signup block itself should start only a small
 * distance below the Login component.
 */
#eafs-login-container + .eafs-page-signup {
    margin-top: 10px;
}


/* =========================================================
   PROCESSING OVERLAY
   ========================================================= */

.eafs-processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 30px;
    background:
        rgba(
            255,
            255,
            255,
            0.96
        );
    text-align: center;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

/**
 * Processing box.
 */
.eafs-processing-box {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/**
 * Spinner.
 */
.eafs-processing-spinner {
    width: 45px;
    height: 45px;
    margin:
        0 auto
        20px;
    box-sizing: border-box;
    border: 4px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation:
        eafsIntSpin
        0.8s
        linear
        infinite;
}

/**
 * Processing title.
 */
.eafs-processing-title {
    font-weight: 600;
    color: #333;
}

/**
 * Processing description.
 */
.eafs-processing-description {
    margin-top: 3px;
    font-size: 14px;
    color: #777;
}

/**
 * Spinner animation.
 */
@keyframes eafsIntSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 480px) {
    .entry-content:has(#eafs-login-container) {
        padding-bottom: 40px;
    }

    .eafs-page-signup {
        margin-top: 10px;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 14px;
        text-align: center;
    }
}
