/**
 * FEF Login / Register Widget CSS
 * Base styles — all colors/spacing/typography are overridable via Elementor
 * style controls in the widget panel.
 */

.fef-lr-form {
    max-width: 420px;
    margin: 0 auto;
    padding: 32px 28px;
    font-family: inherit;
    box-sizing: border-box;
}
.fef-lr-form *, .fef-lr-form *::before, .fef-lr-form *::after {
    box-sizing: border-box;
}

.fef-lr-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}
.fef-lr-subtitle {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Fields ── */
.fef-lr-field {
    margin-bottom: 14px;
    position: relative;
}
.fef-lr-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
}
.fef-lr-field input {
    width: 100%;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.fef-lr-field input:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.fef-lr-field input::placeholder {
    color: #94a3b8;
}

/* ── Password field with eye icon ── */
.fef-lr-input-wrap {
    position: relative;
}
.fef-lr-eye {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 15px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.fef-lr-eye:hover {
    color: #1e293b;
    background: rgba(0, 0, 0, 0.04);
}
/* Hover effect variants — each keeps the translateY(-50%) vertical
   centering intact and adds motion on top of it. */
.fef-lr-eye[data-hover-effect="scale"]:hover {
    transform: translateY(-50%) scale(1.18);
}
.fef-lr-eye[data-hover-effect="rotate"]:hover {
    transform: translateY(-50%) rotate(-12deg);
}
.fef-lr-eye[data-hover-effect="bounce"]:hover {
    animation: fef-lr-eye-bounce 0.5s ease;
}
@keyframes fef-lr-eye-bounce {
    0%, 100% { transform: translateY(-50%); }
    30% { transform: translateY(-70%); }
    50% { transform: translateY(-40%); }
    70% { transform: translateY(-55%); }
}
.fef-lr-field-password input {
    padding-right: 42px;
}

/* ── Password checklist ── */
.fef-lr-pw-checklist {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 12px;
}
/* Trigger modes: "always" stays visible (default, no extra rule needed).
   "focus" and "type" start hidden and are revealed by JS adding
   .fef-lr-pw-checklist-visible once their trigger condition is met. */
.fef-lr-pw-checklist-mode-focus,
.fef-lr-pw-checklist-mode-type {
    display: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.fef-lr-pw-checklist-mode-focus.fef-lr-pw-checklist-visible,
.fef-lr-pw-checklist-mode-type.fef-lr-pw-checklist-visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.fef-lr-pw-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    color: #94a3b8;
    transition: color 0.15s ease;
}
.fef-lr-pw-rule i {
    font-size: 8px;
    width: 12px;
    text-align: center;
    transition: transform 0.2s ease;
}
.fef-lr-pw-rule.pass {
    color: #059669;
}
.fef-lr-pw-rule.pass i {
    font-size: 12px;
    transform: scale(1);
}

/* Confirm password match message */
.fef-lr-confirm-msg {
    margin-top: 6px;
    font-size: 12px;
    min-height: 16px;
    line-height: 1.4;
}
.fef-lr-confirm-msg.match {
    color: #059669;
}
.fef-lr-confirm-msg.mismatch {
    color: #dc2626;
}

/* ── Row Inline (remember/forgot) ── */
.fef-lr-row-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 13px;
    flex-wrap: wrap;
}
.fef-lr-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #334155;
}
.fef-lr-checkbox input {
    width: auto;
    margin: 0;
    accent-color: #3b82f6;
}
.fef-lr-forgot {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}
.fef-lr-forgot:hover {
    text-decoration: underline;
}

/* ── Captcha ── */
.fef-lr-captcha input {
    max-width: 120px;
}

/* ── Text/Alphanumeric Captcha ── */
.fef-lr-captcha-text input[name="captcha_answer_text"] {
    max-width: 160px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.fef-lr-captcha-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.fef-lr-captcha-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #f1f5f9;
    border-radius: 6px;
    user-select: none;
    -webkit-user-select: none;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
}
.fef-lr-captcha-code span {
    display: inline-block;
    color: #1e293b;
    font-size: 24px;
    margin-right: 6px;
}
.fef-lr-captcha-code span:last-child {
    margin-right: 0;
}
.fef-lr-captcha-refresh {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #3b82f6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.fef-lr-captcha-refresh:hover {
    color: #2563eb;
    border-color: #93c5fd;
    transform: rotate(45deg);
}
.fef-lr-captcha-refresh:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ── Honeypot — visually hidden but still receives input from bots ── */
.fef-lr-honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ── Submit button ── */
.fef-lr-submit {
    display: flex;
    align-items: center;
    justify-content: center; /* fallback default — overridden inline by render_submit_button() based on Icon/Text Spacing */
    width: 100%; /* fallback default — overridden by the Button Placement style control */
    padding: 14px 20px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
    font-family: inherit;
}
.fef-lr-submit:hover {
    background: #2563eb;
}
.fef-lr-submit:active {
    transform: translateY(1px);
}
.fef-lr-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.fef-lr-submit.loading .fef-lr-submit-label,
.fef-lr-submit.loading > i:not(.fa-spinner) {
    display: none;
}
.fef-lr-submit.loading .fef-lr-submit-spinner {
    display: inline-block !important;
}

/* ── Submit button hover motion effects ── */
.fef-lr-btn-hover-scale:hover {
    transform: scale(1.05);
}
.fef-lr-btn-hover-grow:hover {
    transform: scale(1.08) translateY(-2px);
}
.fef-lr-btn-hover-scale:active,
.fef-lr-btn-hover-grow:active {
    transform: scale(0.98);
}

/* ── Submit button icon animations ──
   --fef-lr-icon-anim-dur is set inline by the Speed style control.
   "hover" variants only animate while the parent button is hovered;
   "loop" variants animate continuously regardless of hover state. */
.fef-lr-submit-icon {
    --fef-lr-icon-anim-dur: 1s;
    display: inline-flex;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
.fef-lr-icon-anim-loop.fef-lr-icon-anim-pulse {
    animation-name: fef-lr-icon-pulse;
    animation-duration: var(--fef-lr-icon-anim-dur);
}
.fef-lr-icon-anim-loop.fef-lr-icon-anim-wiggle {
    animation-name: fef-lr-icon-wiggle;
    animation-duration: var(--fef-lr-icon-anim-dur);
}
.fef-lr-icon-anim-loop.fef-lr-icon-anim-vibrate {
    animation-name: fef-lr-icon-vibrate;
    animation-duration: var(--fef-lr-icon-anim-dur);
}
.fef-lr-icon-anim-loop.fef-lr-icon-anim-slide {
    animation-name: fef-lr-icon-slide;
    animation-duration: var(--fef-lr-icon-anim-dur);
}
.fef-lr-submit:hover .fef-lr-icon-anim-hover.fef-lr-icon-anim-pulse {
    animation-name: fef-lr-icon-pulse;
    animation-duration: var(--fef-lr-icon-anim-dur);
}
.fef-lr-submit:hover .fef-lr-icon-anim-hover.fef-lr-icon-anim-wiggle {
    animation-name: fef-lr-icon-wiggle;
    animation-duration: var(--fef-lr-icon-anim-dur);
}
.fef-lr-submit:hover .fef-lr-icon-anim-hover.fef-lr-icon-anim-vibrate {
    animation-name: fef-lr-icon-vibrate;
    animation-duration: var(--fef-lr-icon-anim-dur);
}
.fef-lr-submit:hover .fef-lr-icon-anim-hover.fef-lr-icon-anim-slide {
    animation-name: fef-lr-icon-slide;
    animation-duration: var(--fef-lr-icon-anim-dur);
}

@keyframes fef-lr-icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}
@keyframes fef-lr-icon-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-14deg); }
    75% { transform: rotate(14deg); }
}
@keyframes fef-lr-icon-vibrate {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(2px, -1px); }
    60% { transform: translate(-2px, -1px); }
    80% { transform: translate(2px, 1px); }
}
@keyframes fef-lr-icon-slide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

@media (prefers-reduced-motion: reduce) {
    .fef-lr-submit-icon,
    .fef-lr-btn-hover-scale:hover,
    .fef-lr-btn-hover-grow:hover {
        animation: none !important;
        transform: none !important;
    }
}

/* ── Response message ── */
.fef-lr-message {
    margin-top: 14px;
    padding: 0;
    display: none;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}
.fef-lr-message.show {
    display: block;
    padding: 12px 14px;
}
.fef-lr-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.fef-lr-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.fef-lr-message i {
    margin-right: 6px;
}

/* ── Logged-in state ── */
.fef-lr-loggedin {
    text-align: center;
}
.fef-lr-account {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 4px 0 16px;
}
.fef-lr-avatar img {
    border-radius: 50%;
    display: block;
}
.fef-lr-account-info {
    flex: 1;
    min-width: 0;
}
.fef-lr-greeting {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}
.fef-lr-account-email {
    font-size: 13px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fef-lr-account-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
.fef-lr-btn-primary,
.fef-lr-btn-secondary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}
.fef-lr-btn-primary {
    background: #3b82f6;
    color: #fff;
}
.fef-lr-btn-primary:hover {
    background: #2563eb;
    color: #fff;
}
.fef-lr-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.fef-lr-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .fef-lr-form *,
    .fef-lr-submit,
    .fef-lr-pw-rule {
        transition: none !important;
    }
    .fef-lr-submit-spinner {
        animation: none !important;
    }
}

/* ================================================================
   PROMPT ROW — "New to the website? Signup" / "Already have an
   account? Login" — shown below the submit button.
   ================================================================ */
.fef-lr-prompt-row {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
}
.fef-lr-prompt-text {
    color: #64748b;
}
.fef-lr-prompt-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}
.fef-lr-prompt-link:hover {
    text-decoration: underline;
}

/* ================================================================
   VERIFICATION RETURN BANNER — shown above the form when a visitor
   lands here after clicking the email verification link.
   ================================================================ */
.fef-lr-verify-banner {
    max-width: 420px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.fef-lr-verify-ok {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.fef-lr-verify-fail {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ================================================================
   SUCCESS PANEL — icon + title + message + continue button.
   Replaces the form in-place once a terminal success state is reached.
   ================================================================ */
.fef-lr-success {
    max-width: 420px;
    margin: 0 auto;
    padding: 32px 28px;
    text-align: center;
    box-sizing: border-box;
}
.fef-lr-success-icon {
    display: block;
    font-size: 48px;
    color: #16a34a;
    margin-bottom: 12px;
}
.fef-lr-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}
.fef-lr-success-msg {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}
.fef-lr-continue-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #1e293b;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s ease;
}
.fef-lr-continue-btn:hover {
    background: #334155;
    color: #fff;
}

/* ================================================================
   OTP PANEL — 6-digit code entry after registration.
   ================================================================ */
.fef-lr-otp-panel {
    max-width: 420px;
    margin: 0 auto;
    padding: 32px 28px;
    text-align: center;
    box-sizing: border-box;
}
.fef-lr-otp-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}
.fef-lr-otp-input {
    width: 100%;
    padding: 14px;
    text-align: center;
    font-size: 22px;
    letter-spacing: 8px;
    font-weight: 700;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fef-lr-otp-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.fef-lr-otp-resend {
    margin-top: 14px;
    font-size: 13px;
}
.fef-lr-otp-resend-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}
.fef-lr-otp-resend-link:hover {
    text-decoration: underline;
}
.fef-lr-otp-message {
    margin-top: 12px;
}

/* Prompt underline-on-hover toggle support (default is always-underlined
   via .fef-lr-forgot / .fef-lr-prompt-link text-decoration in the base
   rules above; when the "Underline on Hover Only" style control is ON,
   Elementor emits an inline rule overriding text-decoration to none for
   the resting state, and the :hover rule above still applies) */

/* ── Change Password: "please log in first" guest state ──
   Shown instead of the form when a logged-out visitor reaches a Change
   Password widget instance. Shares the same card language as the success
   panel so it doesn't look like a separate, unstyled fragment. */
.fef-lr-cp-guest {
    max-width: 420px;
    margin: 0 auto;
    padding: 32px 28px;
    text-align: center;
    box-sizing: border-box;
}
.fef-lr-cp-guest-msg {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 20px;
}
/* ═══════════════════════════════════════════════════════════════
   LOGIN VIA OTP — tab UI + OTP form styling
   ═══════════════════════════════════════════════════════════════ */
.fef-lr-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    background: transparent;
}
.fef-lr-tab {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
    margin-bottom: -2px;
}
.fef-lr-tab:hover {
    color: #1e293b;
}
.fef-lr-tab-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.fef-lr-panel {
    display: none;
}
.fef-lr-panel-active {
    display: block;
}

/* OTP form buttons */
.fef-lr-otp-send-btn,
.fef-lr-otp-verify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    width: 100%;
    margin-top: 8px;
}
.fef-lr-otp-send-btn:hover:not(:disabled),
.fef-lr-otp-verify-btn:hover:not(:disabled) {
    background: #1d4ed8;
}
.fef-lr-otp-send-btn:disabled,
.fef-lr-otp-verify-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* OTP code input — style for OTP visual */
.fef-lr-otp-code {
    font-size: 20px !important;
    text-align: center;
    letter-spacing: 6px;
    font-family: ui-monospace, monospace;
}

/* Resend link */
.fef-lr-otp-resend-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: #2563eb;
    font-size: 13px;
    text-decoration: none;
}
.fef-lr-otp-resend-link:hover {
    text-decoration: underline;
}

/* Result messages */
.fef-lr-otp-result {
    margin-top: 12px;
    font-size: 13px;
    min-height: 20px;
}
.fef-lr-otp-ok   { color: #16a34a; }
.fef-lr-otp-err  { color: #dc2626; }
.fef-lr-otp-info { color: #2563eb; }

.fef-lr-otp-only-notice {
    padding: 8px;
    background: #f8fafc;
    border-radius: 4px;
}