/**
 * FEF Login / Register — Mobile OTP Verification (form type "OTP Verification").
 * The card, title, labels, inputs, button and message re-use the existing .fef-lr-* classes so the widget's
 * normal Style tab applies; this file only adds what is specific to the OTP flow.
 */
.fef-lrotp { --lrotp-accent: #3b82f6; }
.fef-lrotp [hidden] { display: none !important; }

/* Mobile number: fixed country code + input as one control */
.fef-lrotp-phone { display: flex; align-items: stretch; width: 100%; }
.fef-lrotp-cc {
    display: flex; align-items: center; flex: 0 0 auto;
    padding: 0 12px; background: #eef2f7; color: #334155;
    border: 1px solid #e2e8f0; border-right: 0; border-radius: 8px 0 0 8px;
    font-size: 14px; font-weight: 600; line-height: 1; user-select: none; white-space: nowrap;
}
.fef-lr-field .fef-lrotp-phone .fef-lrotp-mobile {
    flex: 1 1 auto; min-width: 0; width: auto;
    border-radius: 0 8px 8px 0; letter-spacing: .04em;
}
.fef-lr-field .fef-lrotp-phone .fef-lrotp-mobile:focus { border-color: var(--lrotp-accent); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.fef-lr-field .fef-lrotp-phone .fef-lrotp-mobile.is-locked { background: #f1f5f9; color: #475569; cursor: not-allowed; }
.fef-lrotp-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

/* Channel chooser */
.fef-lrotp-chan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 14px; }
.fef-lrotp-chan-q { font-size: 13px; font-weight: 500; color: #334155; margin-right: 2px; }
.fef-lrotp-chip { display: inline-flex; cursor: pointer; }
.fef-lrotp-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fef-lrotp-chip span {
    display: inline-block; padding: 7px 14px; border: 1px solid #cbd5e1; border-radius: 999px;
    font-size: 13px; font-weight: 500; color: #334155; background: #fff; transition: all .15s ease;
}
.fef-lrotp-chip input:checked + span { border-color: var(--lrotp-accent); background: var(--lrotp-accent); color: #fff; }
.fef-lrotp-chip input:focus-visible + span { outline: 2px solid var(--lrotp-accent); outline-offset: 2px; }

/* Headings inside steps */
.fef-lrotp-h { margin: 0 0 6px; font-size: 20px; font-weight: 700; line-height: 1.3; color: #1e293b; text-align: center; }
.fef-lrotp-sub { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: #64748b; text-align: center; }

/* OTP boxes */
.fef-lrotp-boxes { display: flex; justify-content: center; flex-wrap: nowrap; gap: 8px; margin: 0 0 12px; }
.fef-lrotp-box {
    width: 44px; height: 50px; padding: 0 !important; text-align: center;
    font-size: 20px; font-weight: 600; font-family: inherit; line-height: 1;
    color: #1e293b; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px;
    outline: none; box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    -moz-appearance: textfield; appearance: none; flex: 0 1 auto; min-width: 0;
}
.fef-lrotp-box:focus { border-color: var(--lrotp-accent); background: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.18); }
.fef-lrotp-box.is-bad { border-color: #ef4444; background: #fef2f2; animation: fef-lrotp-shake .35s ease; }
@keyframes fef-lrotp-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.fef-lrotp-timer { margin: 0 0 14px; text-align: center; font-size: 13px; font-weight: 500; color: var(--lrotp-accent); font-variant-numeric: tabular-nums; min-height: 18px; }
.fef-lrotp-timer.is-expired { color: #b91c1c; }

.fef-lrotp .fef-lr-submit.loading { opacity: .7; cursor: progress; }
.fef-lrotp .fef-lr-submit:disabled { opacity: .55; cursor: not-allowed; }

.fef-lrotp-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.fef-lrotp-link {
    background: none !important; border: 0 !important; padding: 4px 0 !important; margin: 0;
    font: inherit; font-size: 13px; font-weight: 500; color: var(--lrotp-accent) !important; cursor: pointer; text-decoration: none; box-shadow: none !important;
}
.fef-lrotp-link:hover:not(:disabled) { text-decoration: underline; }
.fef-lrotp-link:disabled { color: #94a3b8 !important; cursor: default; }
.fef-lrotp-link:focus-visible { outline: 2px solid var(--lrotp-accent); outline-offset: 2px; border-radius: 4px; }

/* Extra details */
.fef-lrotp-pfields { margin-bottom: 4px; }
.fef-lr-field .fef-lrotp-sel, .fef-lr-field .fef-lrotp-ta {
    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;
}
.fef-lr-field .fef-lrotp-sel:focus, .fef-lr-field .fef-lrotp-ta:focus { border-color: var(--lrotp-accent); background: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.fef-lrotp-ferr { margin-top: 4px; min-height: 0; font-size: 12px; color: #b91c1c; }

/* Done */
.fef-lrotp-tick {
    width: 56px; height: 56px; margin: 4px auto 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #dcfce7; color: #16a34a; font-size: 28px; font-weight: 700; line-height: 1;
    animation: fef-lrotp-pop .35s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes fef-lrotp-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.fef-lrotp-editor-note { margin: 0 0 12px; padding: 8px 10px; border-radius: 6px; background: #fef3c7; color: #92400e; font-size: 12px; line-height: 1.4; }

@media (max-width: 400px) {
    .fef-lrotp-boxes { gap: 5px; }
    .fef-lrotp-box { width: 38px; height: 46px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .fef-lrotp-box.is-bad, .fef-lrotp-tick { animation: none; }
}

.fef-lrotp-step[data-step="profile"] .fef-lrotp-h { margin-bottom: 16px; }

/* Button loader (settings: OTP · Button Loader). Colours/size/speed are CSS variables the Style tab sets. */
.fef-lrotp .fef-lr-submit { position: relative; --ld-gap: 8px; display: flex; align-items: center; justify-content: center; }
/* The loader ↔ label space is a MARGIN on the loader (not flex `gap`), so it still works when a theme / the widget's Button Placement
   changes the button's display. The Style tab's "Gap" sliders set --ld-gap. */
.fef-lrotp .fef-lr-submit.ld-before > .fef-lrotp-ld { margin-right: var(--ld-gap, 8px); }
.fef-lrotp .fef-lr-submit.ld-after > .fef-lrotp-ld { margin-left: var(--ld-gap, 8px); }
.fef-lrotp-ld { --ld-size: 18px; --ld-color: currentColor; --ld-track: rgba(255,255,255,.35); --ld-th: 2px; --ld-speed: .8s; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: calc(var(--ld-size) / 6); }
.fef-lrotp-ld--spinner { width: var(--ld-size); height: var(--ld-size); border: var(--ld-th) solid var(--ld-track); border-top-color: var(--ld-color); border-radius: 50%; animation: fef-lrotp-spin var(--ld-speed) linear infinite; box-sizing: border-box; }
.fef-lrotp-ld--dots i { width: calc(var(--ld-size) / 3); height: calc(var(--ld-size) / 3); border-radius: 50%; background: var(--ld-color); animation: fef-lrotp-bounce calc(var(--ld-speed) * 1.5) ease-in-out infinite both; }
.fef-lrotp-ld--dots i:nth-child(2) { animation-delay: .15s; } .fef-lrotp-ld--dots i:nth-child(3) { animation-delay: .3s; }
.fef-lrotp-ld--pulse { width: var(--ld-size); height: var(--ld-size); border-radius: 50%; background: var(--ld-color); animation: fef-lrotp-pulse calc(var(--ld-speed) * 1.5) ease-in-out infinite; }
.fef-lrotp-ld--bars { height: var(--ld-size); align-items: center; }
.fef-lrotp-ld--bars i { width: calc(var(--ld-size) / 5); height: 100%; background: var(--ld-color); border-radius: 2px; animation: fef-lrotp-bar calc(var(--ld-speed) * 1.4) ease-in-out infinite both; }
.fef-lrotp-ld--bars i:nth-child(2) { animation-delay: .15s; } .fef-lrotp-ld--bars i:nth-child(3) { animation-delay: .3s; }
.fef-lr-submit.ld-replace .fef-lrotp-bt { display: none; }
@keyframes fef-lrotp-spin { to { transform: rotate(360deg); } }
@keyframes fef-lrotp-bounce { 0%, 80%, 100% { transform: scale(.4); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
@keyframes fef-lrotp-pulse { 0%, 100% { transform: scale(.55); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }
@keyframes fef-lrotp-bar { 0%, 80%, 100% { transform: scaleY(.35); } 40% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .fef-lrotp-ld, .fef-lrotp-ld i { animation-duration: 2.4s !important; } }

/* Elementor-editor preview bar (created by JS only inside the editor) */
.fef-lrotp-pv { margin: 0 0 14px; padding: 8px 10px; border: 1px dashed #f59e0b; background: #fffbeb; border-radius: 8px; text-align: left; font-family: Arial, sans-serif; }
.fef-lrotp-pv-h { font-size: 11px; font-weight: 600; color: #92400e; margin-bottom: 6px; line-height: 1.4; }
.fef-lrotp-pv-row { display: flex; flex-wrap: wrap; gap: 4px; }
.fef-lrotp-pv-b { all: unset; box-sizing: border-box; cursor: pointer; padding: 3px 8px; font-size: 11px; line-height: 1.4; border-radius: 999px; background: #fff; color: #78350f; border: 1px solid #fcd34d; }
.fef-lrotp-pv-b:hover { background: #fef3c7; }
.fef-lrotp-pv-b.is-on { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.fef-lrotp-pv-t { margin-top: 6px; font-size: 10.5px; color: #a16207; }

/* Success icon: font icons use font-size, uploaded / library SVGs follow the same size + colour */
.fef-lrotp-tick i { line-height: 1; }
.fef-lrotp-tick svg { width: 1em; height: 1em; fill: currentColor; }
.fef-lrotp-tick img { width: 60%; height: 60%; object-fit: contain; }

/* "Redirecting…" line under the success message */
.fef-lrotp-redir { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; color: #64748b; font-size: 13px; }
.fef-lrotp-redir[hidden] { display: none !important; }
.fef-lrotp-redir .fef-lrotp-ld { --ld-track: rgba(100,116,139,.25); --ld-color: currentColor; }
.fef-lrotp-redir-t { line-height: 1.3; }

/* OTP form embedded in a Login form tab: no card of its own */
.fef-lrotp--embed { max-width: none; margin: 0; padding: 0; background: none; box-shadow: none; border: 0; }
.fef-lr-panel-otp > .fef-lrotp--embed { width: 100%; }

/* ── Details step: columns + every field type ── */
.fef-lrotp-pfields { --pf-gx: 7px; display: flex; flex-wrap: wrap; margin: 0 calc(var(--pf-gx) * -1) 4px; }
.fef-lrotp-pf { box-sizing: border-box; padding: 0 var(--pf-gx); margin-bottom: 14px; min-width: min(100%, 160px); max-width: 100%; }
.fef-lrotp-pf input:not([type=checkbox]):not([type=radio]), .fef-lrotp-pf select, .fef-lrotp-pf textarea { width: 100%; box-sizing: border-box; }
.fef-lrotp-pf[hidden] { display: none !important; }
.fef-lrotp-pl { margin-bottom: 8px; }
.fef-lrotp-ptitle { margin: 6px 0 0; font-size: 16px; font-weight: 700; color: #1e293b; }
.fef-lrotp-pdesc { font-size: 13px; line-height: 1.5; color: #64748b; }
.fef-lrotp-pdiv { border: 0; border-top: 1px solid #e2e8f0; margin: 4px 0; }
.fef-lrotp-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fef-lrotp-gl { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: #334155; }
.fef-lrotp-help { margin-top: 4px; font-size: 12px; color: #64748b; }
.fef-lrotp-pf.is-invalid input:not([type=checkbox]):not([type=radio]), .fef-lrotp-pf.is-invalid select, .fef-lrotp-pf.is-invalid textarea { border-color: #ef4444; }
.fef-lrotp-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.fef-lrotp-opt, .fef-lrotp-acc { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #334155; cursor: pointer; }
.fef-lrotp-opt input, .fef-lrotp-acc input { width: auto !important; margin: 0; accent-color: var(--lrotp-accent); }
.fef-lrotp-acc a { color: var(--lrotp-accent); }
.fef-lrotp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fef-lrotp-chipb { all: unset; box-sizing: border-box; cursor: pointer; padding: 7px 14px; font-size: 13px; line-height: 1.2; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #334155; transition: all .15s ease; }
.fef-lrotp-chipb:hover { border-color: var(--lrotp-accent); }
.fef-lrotp-chipb.is-on { background: var(--lrotp-accent); border-color: var(--lrotp-accent); color: #fff; }
.fef-lrotp-chipb:focus-visible { outline: 2px solid var(--lrotp-accent); outline-offset: 2px; }
.fef-lrotp-chipb[hidden] { display: none; }
.fef-lrotp-chipf { margin-bottom: 8px; }
.fef-lrotp-tgl { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: #334155; }
.fef-lrotp-tgl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fef-lrotp-tgl-s { --tg-w: 40px; --tg-h: 22px; position: relative; width: var(--tg-w); height: var(--tg-h); border-radius: 999px; background: #cbd5e1; transition: background .15s ease; flex: 0 0 auto; }
.fef-lrotp-tgl-s::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(var(--tg-h) - 6px); height: calc(var(--tg-h) - 6px); border-radius: 50%; background: #fff; transition: transform .15s ease; }
.fef-lrotp-tgl input:checked + .fef-lrotp-tgl-s { background: var(--lrotp-accent); }
.fef-lrotp-tgl input:checked + .fef-lrotp-tgl-s::after { transform: translateX(calc(var(--tg-w) - var(--tg-h))); }
.fef-lrotp-tgl input:focus-visible + .fef-lrotp-tgl-s { outline: 2px solid var(--lrotp-accent); outline-offset: 2px; }
@media (max-width: 480px) { .fef-lrotp-pf { width: 100% !important; } }

/* select / textarea in the details step look like the other inputs */
.fef-lrotp-pf select.fef-lrotp-sel { height: auto; min-height: 44px; line-height: 1.4; appearance: auto; }
.fef-lrotp-pf textarea.fef-lrotp-ta { resize: vertical; }

/* The base ".fef-lr-field label / input" rules would turn these into block labels with padded inputs — win back the layout */
.fef-lr-field .fef-lrotp-tgl, .fef-lr-field .fef-lrotp-opt, .fef-lr-field .fef-lrotp-acc { display: inline-flex; align-items: center; margin: 0; font-size: 14px; font-weight: 400; color: #334155; }
.fef-lr-field .fef-lrotp-opt input, .fef-lr-field .fef-lrotp-acc input { padding: 0; width: 18px !important; height: 18px; flex: 0 0 auto; border-radius: 4px; background: none; box-shadow: none; }
.fef-lr-field .fef-lrotp-opt input[type=radio] { border-radius: 50%; }
.fef-lr-field .fef-lrotp-tgl input { position: absolute; opacity: 0; width: 1px !important; height: 1px; padding: 0; border: 0; }
.fef-lr-field label.fef-lrotp-gl, .fef-lr-field span.fef-lrotp-gl { display: block; margin-bottom: 6px; }
.fef-lr-field .fef-lrotp-chipf { width: 100%; }

/* "This email already has an account" — validation line + a decorative "verify ownership" card under the email field */
.fef-lrotp-pf.is-invalid > .fef-lrotp-ferr:not(:empty) { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 13px; line-height: 1.4; }
.fef-lrotp-pf.is-invalid > .fef-lrotp-ferr:not(:empty)::before { content: "⚠"; flex: 0 0 auto; }
.fef-lrotp-linkbox { margin-top: 10px; }
.fef-lrotp-linkcard { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%); border: 1px solid #c7d2fe; box-shadow: 0 2px 10px rgba(79,70,229,.08); }
.fef-lrotp-linkicon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; color: #4f46e5; font-size: 18px; box-shadow: 0 1px 4px rgba(79,70,229,.25); }
.fef-lrotp-linkbody { flex: 1 1 auto; min-width: 0; }
.fef-lrotp-linkhead { font-size: 14px; font-weight: 700; color: #312e81; margin-bottom: 3px; }
.fef-lrotp-linktxt { font-size: 13px; line-height: 1.5; color: #475569; }
.fef-lrotp-linkact { margin-top: 10px; }
.fef-lrotp-linkbtn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--lb-gap, 8px); cursor: pointer; text-align: center; padding: 9px 18px; border-radius: 8px; background: var(--lrotp-accent); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 2px 6px rgba(59,130,246,.3); transition: all .15s ease; }
.fef-lrotp-linkbtn:hover:not(:disabled) { filter: brightness(1.08); }
.fef-lrotp-lb-ic { display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 14px; }
.fef-lrotp-lb-ic svg { width: 1em; height: 1em; fill: currentColor; }
.fef-lrotp-lb-ic i { line-height: 1; }
.fef-lrotp-linkact { display: flex; }
.fef-lrotp-linkbtn:disabled { opacity: .6; cursor: default; box-shadow: none; }
.fef-lrotp-linknote { margin-top: 10px; font-size: 13px; line-height: 1.5; }
.fef-lrotp-linknote:empty { display: none; }
.fef-lrotp-linknote.is-ok { color: #166534; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; padding: 9px 12px; }
.fef-lrotp-linknote.is-err { color: #b91c1c; }
@media (max-width: 420px) { .fef-lrotp-linkcard { flex-direction: column; } }
