/**
 * Fluent Auth & Social Login - Modern Specialty Commerce Auth Design System
 * Zero-conflict styling architecture for Bricks Builder
 */

:root {
    --bsec-auth-primary: #1C352D;
    --bsec-auth-primary-hover: #12221D;
    --bsec-auth-accent: #D4A373;
    --bsec-auth-bg-card: #FFFFFF;
    --bsec-auth-bg-subtle: #F8F9FA;
    --bsec-auth-bg-input: #FFFFFF;
    --bsec-auth-text-main: #1C1917;
    --bsec-auth-text-muted: #78716C;
    --bsec-auth-text-light: #A8A29E;
    --bsec-auth-border: #E7E5E4;
    --bsec-auth-border-focus: #1C352D;
    --bsec-auth-radius-sm: 6px;
    --bsec-auth-radius-md: 12px;
    --bsec-auth-radius-lg: 20px;
    --bsec-auth-radius-full: 9999px;
    --bsec-auth-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.03);
    --bsec-auth-transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Outer Container & Centered Card
   ========================================================================== */

.bsec-auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 30px 16px 60px 16px;
    box-sizing: border-box;
}

.bsec-auth-container *,
.bsec-auth-container *::before,
.bsec-auth-container *::after {
    box-sizing: border-box;
}

.bsec-auth-card {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    background-color: var(--bsec-auth-bg-card);
    border: 1px solid var(--bsec-auth-border);
    border-radius: var(--bsec-auth-radius-lg);
    box-shadow: var(--bsec-auth-shadow);
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   Header & Branding Badge
   ========================================================================== */

.bsec-auth-header {
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bsec-auth-brand-badge {
    width: 46px;
    height: 46px;
    border-radius: var(--bsec-auth-radius-full);
    background-color: rgba(28, 53, 45, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--bsec-auth-primary);
    transition: var(--bsec-auth-transition);
}

.bsec-auth-card:hover .bsec-auth-brand-badge {
    transform: scale(1.06);
}

.bsec-auth-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--bsec-auth-text-main);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.bsec-auth-subtitle {
    font-size: 0.9rem;
    color: var(--bsec-auth-text-muted);
    margin: 0;
    line-height: 1.45;
    max-width: 360px;
}

/* ==========================================================================
   Segmented Tab Switcher Bar
   ========================================================================== */

.bsec-auth-tabs-bar {
    display: flex;
    background-color: var(--bsec-auth-bg-subtle);
    border: 1px solid var(--bsec-auth-border);
    border-radius: var(--bsec-auth-radius-md);
    padding: 4px;
    margin-bottom: 22px;
    gap: 4px;
}

.bsec-auth-tab-btn {
    flex: 1 1 0%;
    padding: 9px 8px;
    background: transparent;
    border: none;
    border-radius: var(--bsec-auth-radius-sm);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--bsec-auth-text-muted);
    cursor: pointer;
    text-align: center;
    transition: var(--bsec-auth-transition);
    user-select: none;
    white-space: nowrap;
}

.bsec-auth-tab-btn:hover {
    color: var(--bsec-auth-text-main);
}

.bsec-auth-tab-btn.is-active {
    background-color: #FFFFFF;
    color: var(--bsec-auth-text-main);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.04);
}

/* Tab Content Visibility */
.bsec-auth-tab-content {
    display: none;
    animation: bsec-auth-fade 0.25s ease forwards;
}

.bsec-auth-tab-content.is-active {
    display: block;
}

@keyframes bsec-auth-fade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Social Logins & Divider
   ========================================================================== */

.bsec-auth-social-wrap {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bsec-auth-social-wrap .fs_auth_buttons_wrap,
.bsec-auth-social-wrap .fs_auth_buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.bsec-auth-card .fs_auth_btn,
.bsec-auth-social-wrap a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background-color: #FFFFFF;
    border: 1px solid var(--bsec-auth-border);
    border-radius: var(--bsec-auth-radius-sm);
    color: var(--bsec-auth-text-main);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--bsec-auth-transition);
}

.bsec-auth-card .fs_auth_btn:hover,
.bsec-auth-social-wrap a:hover {
    background-color: var(--bsec-auth-bg-subtle);
    border-color: var(--bsec-auth-text-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.bsec-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--bsec-auth-text-light);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.bsec-auth-divider::before,
.bsec-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--bsec-auth-border);
}

.bsec-auth-divider span {
    padding: 0 14px;
}

/* ==========================================================================
   Form Wrappers & Input Fields
   ========================================================================== */

.bsec-auth-card .fls_auth_wrapper,
.bsec-auth-card .fls_login_wrapper,
.bsec-auth-card .fls_registration_wrapper,
.bsec-auth-card .fls_reset_pass_wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.bsec-auth-card .fls_field_group,
.bsec-auth-card p.login-username,
.bsec-auth-card p.login-password,
.bsec-auth-card p.login-remember,
.bsec-auth-card p.login-submit {
    margin-bottom: 16px;
    position: relative;
}

.bsec-auth-card .fls_field_label,
.bsec-auth-card p.login-username label,
.bsec-auth-card p.login-password label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bsec-auth-text-main);
    margin-bottom: 6px;
}

.bsec-auth-card input[type="text"],
.bsec-auth-card input[type="email"],
.bsec-auth-card input[type="password"],
.bsec-auth-card .fls_magic_input {
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--bsec-auth-text-main);
    background-color: var(--bsec-auth-bg-input);
    border: 1px solid var(--bsec-auth-border);
    border-radius: var(--bsec-auth-radius-sm);
    outline: none;
    transition: var(--bsec-auth-transition);
}

.bsec-auth-card input[type="text"]:focus,
.bsec-auth-card input[type="email"]:focus,
.bsec-auth-card input[type="password"]:focus,
.bsec-auth-card .fls_magic_input:focus {
    border-color: var(--bsec-auth-border-focus);
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(28, 53, 45, 0.08);
}

/* Password Eye Toggle Icon */
.bsec-password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--bsec-auth-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.bsec-password-toggle-btn:hover {
    color: var(--bsec-auth-text-main);
}

/* Checkbox & Remember Me */
.bsec-auth-card p.login-remember,
.bsec-auth-card .fs_reg_item_terms {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--bsec-auth-text-muted);
    margin: 12px 0 16px 0;
}

.bsec-auth-card p.login-remember label,
.bsec-auth-card .fs_reg_item_terms label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--bsec-auth-text-muted);
    cursor: pointer;
    user-select: none;
}

.bsec-auth-card p.login-remember input[type="checkbox"],
.bsec-auth-card .fs_reg_item_terms input[type="checkbox"] {
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--bsec-auth-border);
    border-radius: 4px;
    accent-color: var(--bsec-auth-primary);
    cursor: pointer;
    margin: 0;
}

/* ==========================================================================
   Submit Action Buttons
   ========================================================================== */

.bsec-auth-card p.login-submit {
    width: 100%;
    margin-top: 18px;
    margin-bottom: 0;
}

.bsec-auth-card button[type="submit"],
.bsec-auth-card input[type="submit"],
.bsec-auth-card #fls_submit,
.bsec-auth-card #fls_reset_pass,
.bsec-auth-card #fls_magic_submit,
.bsec-auth-card p.login-submit input#wp-submit {
    width: 100%;
    height: 46px;
    background-color: var(--bsec-auth-primary);
    color: #FFFFFF;
    font-size: 0.92rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: var(--bsec-auth-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    line-height: 1;
    transition: var(--bsec-auth-transition);
    box-shadow: 0 4px 12px rgba(28, 53, 45, 0.15);
    text-decoration: none;
}

.bsec-auth-card button[type="submit"]:hover,
.bsec-auth-card input[type="submit"]:hover,
.bsec-auth-card #fls_submit:hover,
.bsec-auth-card #fls_reset_pass:hover,
.bsec-auth-card p.login-submit input#wp-submit:hover {
    background-color: var(--bsec-auth-primary-hover);
    box-shadow: 0 6px 18px rgba(28, 53, 45, 0.22);
    transform: translateY(-1px);
    color: #FFFFFF;
}

.bsec-auth-card button[type="submit"]:active,
.bsec-auth-card input[type="submit"]:active {
    transform: scale(0.99);
}

/* Secondary Navigation Text Links */
.bsec-auth-card .fls_login_wrapper p,
.bsec-auth-card .fls_registration_wrapper p,
.bsec-auth-card .fls_reset_pass_wrapper p {
    font-size: 0.85rem;
    color: var(--bsec-auth-text-muted);
}

.bsec-auth-card a#fls_show_signup,
.bsec-auth-card a#fls_show_login,
.bsec-auth-card a#fls_show_reset_password {
    color: var(--bsec-auth-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.bsec-auth-card a#fls_show_signup:hover,
.bsec-auth-card a#fls_show_login:hover,
.bsec-auth-card a#fls_show_reset_password:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Logged-in Customer Profile Card
   ========================================================================== */

.bsec-auth-logged-in-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 0;
}

.bsec-auth-user-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--bsec-auth-radius-full);
    overflow: hidden;
    margin-bottom: 14px;
    border: 3px solid rgba(28, 53, 45, 0.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.bsec-auth-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bsec-auth-user-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bsec-auth-text-main);
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.bsec-auth-user-email {
    font-size: 0.88rem;
    color: var(--bsec-auth-text-muted);
    margin: 0 0 10px 0;
}

.bsec-auth-user-role-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background-color: rgba(28, 53, 45, 0.08);
    color: var(--bsec-auth-primary);
    border-radius: var(--bsec-auth-radius-full);
    margin-bottom: 22px;
}

.bsec-auth-user-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.bsec-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    padding: 0 18px;
    border-radius: var(--bsec-auth-radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--bsec-auth-transition);
}

.bsec-auth-btn-primary {
    background-color: var(--bsec-auth-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(28, 53, 45, 0.15);
}

.bsec-auth-btn-primary:hover {
    background-color: var(--bsec-auth-primary-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
}

.bsec-auth-btn-secondary {
    background-color: var(--bsec-auth-bg-subtle);
    color: var(--bsec-auth-text-main);
    border: 1px solid var(--bsec-auth-border);
}

.bsec-auth-btn-secondary:hover {
    background-color: #E7E5E4;
    color: var(--bsec-auth-text-main);
}

.bsec-auth-btn-outline {
    background-color: transparent;
    color: #E11D48;
    border: 1px solid #FECDD3;
}

.bsec-auth-btn-outline:hover {
    background-color: #FFF1F2;
    border-color: #FDA4AF;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 540px) {
    .bsec-auth-card {
        padding: 30px 20px;
        border-radius: var(--bsec-auth-radius-md);
    }

    .bsec-auth-title {
        font-size: 1.35rem;
    }

    .bsec-auth-tabs-bar {
        flex-wrap: wrap;
    }

    .bsec-auth-tab-btn {
        font-size: 0.8rem;
        padding: 8px 6px;
    }
}
