/* ==========================================================================
   ParisFloraQA - Modern Authentication Design System (Login / Register / Forgot Password)
   ========================================================================== */

.modern-login,
.modern-auth {
    display: flex;
    min-height: calc(100vh - 120px);
    background-color: var(--color-1, #f7f9fa);
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    font-family: 'Elms Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

.modern-login__container,
.modern-auth__container {
    display: flex;
    max-width: 1100px;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 96, 100, 0.08);
    border: 1px solid var(--color-3, #e0f7fa);
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Left Brand Hero Panel
   -------------------------------------------------------------------------- */
.modern-login__left,
.modern-auth__left {
    flex: 1;
    position: relative;
    background: linear-gradient(145deg, var(--color-4, #4dd0e1), var(--color-6, #006064));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 50px;
    color: #ffffff;
    overflow: hidden;
    box-sizing: border-box;
}

.modern-login__left::before,
.modern-auth__left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/Flower.png');
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    z-index: 1;
    pointer-events: none;
}

.modern-login__left-content,
.modern-auth__left-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modern-auth__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-login__left h1,
.modern-auth__left h1 {
    font-size: 38px;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    line-height: 1.25;
}

.modern-login__left p,
.modern-auth__left p {
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
}

/* Feature Bullets in Left Panel */
.modern-auth__features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 15px;
}

.modern-auth__feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.modern-auth__feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 16px;
}

.modern-auth__feature-text h4 {
    margin: 0 0 2px 0;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.modern-auth__feature-text p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Right Form Panel
   -------------------------------------------------------------------------- */
.modern-login__right,
.modern-auth__right {
    flex: 1.1;
    padding: 60px 70px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.modern-login__right h2,
.modern-auth__right h2 {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-color, #263238);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.modern-login__right p.subtitle,
.modern-auth__right p.subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

/* Grid Layout for Form Rows */
.modern-auth__grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Form Fields */
.modern-login__field,
.modern-auth__field {
    margin-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modern-login__field label,
.modern-auth__field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #263238);
    margin-bottom: 7px;
}

.modern-auth__field label span.required {
    color: #ef4444;
    margin-left: 2px;
}

/* Input Wrapper & Inputs */
.modern-auth__input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.modern-login__field input,
.modern-auth__field input[type="text"],
.modern-auth__field input[type="email"],
.modern-auth__field input[type="tel"],
.modern-auth__field input[type="password"],
.modern-auth__field input.input-text,
.modern-auth__field .woocommerce-Input {
    width: 100% !important;
    max-width: 100% !important;
    height: 52px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-color, #263238);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    outline: none;
    box-sizing: border-box;
    display: block;
}

.modern-auth__input-wrap--has-toggle input,
.modern-auth__input-wrap--has-toggle input[type="password"],
.modern-auth__input-wrap--has-toggle .woocommerce-Input {
    padding-right: 48px !important;
}

/* Ensure any span wrappers stay 100% width and block */
.modern-auth span.password-input,
.modern-auth .woocommerce-input-wrapper,
.modern-login span.password-input,
.modern-login .woocommerce-input-wrapper {
    display: block !important;
    width: 100% !important;
    position: relative !important;
}

.modern-login__field input:focus,
.modern-auth__field input:focus {
    border-color: var(--color-4, #4dd0e1);
    background: #ffffff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-4, #4dd0e1) 20%, transparent);
}

.modern-auth__field input.is-invalid {
    border-color: #ef4444 !important;
    background: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.modern-auth__field input.is-valid {
    border-color: #10b981;
}

/* Field Error Text */
.modern-auth__field-error {
    display: none;
    font-size: 12px;
    font-weight: 500;
    color: #ef4444;
    margin-top: 5px;
    line-height: 1.3;
}

.modern-auth__field.has-error .modern-auth__field-error {
    display: block;
}

/* Password Toggle Button */
.modern-auth__toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 2;
}

.modern-auth__toggle-password:hover {
    color: var(--color-6, #006064);
}

/* Hide WooCommerce core auto-injected password toggle to prevent duplicate eye buttons */
.show-password-input,
.woocommerce-input-wrapper .show-password-input,
.modern-auth .show-password-input,
.modern-login .show-password-input,
.woocommerce-password-toggle,
.woocommerce-form-login .show-password-input {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Checkboxes & Options (Remember Me / Terms)
   -------------------------------------------------------------------------- */
.modern-login__options,
.modern-auth__options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.modern-login__terms,
.modern-auth__terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    color: #475569;
    font-size: 14px;
    line-height: 1.4;
    user-select: none;
    margin-bottom: 22px;
}

.modern-login__terms input[type="checkbox"],
.modern-auth__terms input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-4, #4dd0e1);
    cursor: pointer;
    flex-shrink: 0;
}

.modern-auth__terms a,
.modern-login__options a,
.modern-auth__options a {
    color: var(--color-4, #4dd0e1);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.modern-auth__terms a:hover,
.modern-login__options a:hover,
.modern-auth__options a:hover {
    color: var(--color-6, #006064);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Submit Buttons & Loading States
   -------------------------------------------------------------------------- */
.modern-login__submit,
.modern-auth__submit {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--color-6, #006064), var(--text-color, #263238));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--color-6, #006064) 25%, transparent);
    text-decoration: none;
    box-sizing: border-box;
}

.modern-login__submit:hover,
.modern-auth__submit:hover {
    background: linear-gradient(135deg, var(--text-color, #263238), var(--color-6, #006064));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px color-mix(in srgb, var(--color-6, #006064) 40%, transparent);
    color: #ffffff;
}

.modern-login__submit:active,
.modern-auth__submit:active {
    transform: translateY(0);
}

.modern-auth__submit:disabled,
.modern-auth__submit.is-loading {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Button Spinner */
.modern-auth__spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
    display: none;
}

.modern-auth__submit.is-loading .modern-auth__spinner {
    display: inline-block;
}

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

/* --------------------------------------------------------------------------
   Notice / Alert Boxes
   -------------------------------------------------------------------------- */
.modern-auth__alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.modern-auth__alert i {
    font-size: 18px;
    flex-shrink: 0;
}

.modern-auth__alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.modern-auth__alert--error i {
    color: #dc2626;
}

.modern-auth__alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.modern-auth__alert--success i {
    color: #16a34a;
}

.modern-auth__alert--info {
    background: var(--color-1, #f0fcfe);
    border: 1px solid var(--color-3, #b2ebf2);
    color: var(--color-6, #006064);
}

.modern-auth__alert--info i {
    color: var(--color-4, #4dd0e1);
}

/* --------------------------------------------------------------------------
   Footer Links (Sign In / Sign Up toggles)
   -------------------------------------------------------------------------- */
.modern-login__signup,
.modern-auth__footer-links {
    text-align: center;
    margin-top: 26px;
    font-size: 14px;
    color: #64748b;
}

.modern-login__signup a,
.modern-auth__footer-links a {
    color: var(--color-4, #4dd0e1);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
    margin-left: 4px;
}

.modern-login__signup a:hover,
.modern-auth__footer-links a:hover {
    color: var(--color-6, #006064);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Confirmation / State Screens (e.g. Check Your Email, Logged In)
   -------------------------------------------------------------------------- */
.modern-auth__confirmation {
    text-align: center;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modern-auth__confirmation-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--color-2, #e0f7fa);
    color: var(--color-6, #006064);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(0, 96, 100, 0.12);
}

.modern-auth__confirmation-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-color, #263238);
    margin: 0 0 12px 0;
}

.modern-auth__confirmation-desc {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto 28px auto;
}

.modern-auth__confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
}

.modern-auth__btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.modern-auth__btn-secondary:hover {
    border-color: var(--color-4, #4dd0e1);
    color: var(--color-6, #006064);
    background: #f8fafc;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
    .modern-login,
    .modern-auth {
        padding: 30px 15px;
        min-height: auto;
    }

    .modern-login__container,
    .modern-auth__container {
        flex-direction: column;
        border-radius: 20px;
        max-width: 600px;
    }

    .modern-login__left,
    .modern-auth__left {
        padding: 40px 30px;
        min-height: auto;
    }

    .modern-login__left h1,
    .modern-auth__left h1 {
        font-size: 28px;
    }

    .modern-auth__features {
        display: none; /* Streamline mobile view */
    }

    .modern-login__right,
    .modern-auth__right {
        padding: 40px 30px;
    }

    .modern-auth__grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 520px) {
    .modern-login,
    .modern-auth {
        padding: 20px 12px;
    }

    .modern-login__left,
    .modern-auth__left {
        padding: 30px 20px;
    }

    .modern-login__right,
    .modern-auth__right {
        padding: 30px 20px;
    }

    .modern-login__right h2,
    .modern-auth__right h2 {
        font-size: 24px;
    }

    .modern-login__options,
    .modern-auth__options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
