/* ==========================================================================
   One-time code login ("Log in with a one-time code")
   Builds on the login page's own look (_Layout.css): the Poppins stack, the
   #5C9BD1 -> #2AB4C0 gradient, the #dde3ec fields with a white rim and the
   glass card. Direction-agnostic: logical properties + [dir=rtl] where a
   transform has to flip. Phone numbers, e-mail addresses and codes stay LTR.
   ========================================================================== */

.lc {
    --lc-blue: #5C9BD1;
    --lc-blue-deep: #2f6aa3;
    --lc-teal: #2AB4C0;
    --lc-ink: #26303d;
    --lc-text: #33363b;
    --lc-muted: #667285;
    --lc-field: #dde3ec;
    --lc-ring: rgba(92, 155, 209, .28);
    --lc-danger: #ed6a5b;
    --lc-danger-text: #b83f32;
    --lc-warning-text: #9a6512;
    --lc-success: #1f9e93;
    position: relative;
    padding-top: 12px;
}

.lc [hidden] {
    display: none !important;
}

/* ---------- Header ---------- */

.lc-head {
    text-align: center;
}

.lc-badge {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 4px auto 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    background: linear-gradient(135deg, #5C9BD1 0%, #2AB4C0 100%);
    box-shadow: 0 14px 28px -12px rgba(42, 180, 192, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
    animation: lc-pop .5s cubic-bezier(.2, .9, .3, 1.25) both;
}

.lc-badge::after {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 25px;
    border: 1px solid rgba(92, 155, 209, .28);
}

.login .content .lc-head h3 {
    margin: 0 0 8px;
    line-height: 1.25;
}

.lc-lead {
    margin: 0 auto 24px;
    max-width: 350px;
    color: var(--lc-muted);
    font-size: 14px;
    line-height: 1.65;
}

.lc-lead strong {
    color: var(--lc-ink);
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Segmented control (e-mail / SMS) ---------- */

.lc-seg {
    position: relative;
    display: flex;
    padding: 4px;
    margin: 0 0 22px;
    border-radius: 14px;
    background: rgba(221, 227, 236, .92);
    border: 1px solid #fff;
}

.lc-seg__thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    inset-inline-start: 4px;
    width: calc(50% - 4px);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(38, 48, 61, .12), 0 1px 2px rgba(38, 48, 61, .08);
    transition: transform .3s cubic-bezier(.3, .7, .2, 1);
}

.lc-seg[data-active="sms"] .lc-seg__thumb {
    transform: translateX(100%);
}

html[dir="rtl"] .lc-seg[data-active="sms"] .lc-seg__thumb {
    transform: translateX(-100%);
}

.lc-seg__opt {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 0;
    height: 42px;
    padding: 0 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--lc-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: color .2s;
    white-space: nowrap;
}

.lc-seg__opt i {
    font-size: 16px;
    transition: color .2s;
}

.lc-seg__opt:hover {
    color: var(--lc-ink);
}

.lc-seg__opt[aria-checked="true"] {
    color: var(--lc-ink);
}

.lc-seg__opt[aria-checked="true"] i {
    color: var(--lc-blue);
}

.lc-seg__opt:focus {
    outline: none;
}

.lc-seg__opt:focus-visible {
    box-shadow: 0 0 0 3px var(--lc-ring);
}

/* ---------- Fields ---------- */

.lc-field {
    animation: lc-rise .28s ease both;
}

.lc-label {
    display: block;
    margin: 0 0 8px;
    color: var(--lc-ink);
    font-size: 13px;
    font-weight: 500;
}

.lc-input {
    position: relative;
}

.lc-input > i {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #8290a3;
    font-size: 16px;
    pointer-events: none;
    transition: color .2s;
}

.login .content .lc-input .form-control {
    height: 50px;
    padding: 0 16px 0 46px;
    color: var(--lc-text);
    font-size: 15px;
    border-radius: 12px;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.login .content .lc-input .form-control:focus {
    background-color: #fff;
    border-color: var(--lc-blue);
    box-shadow: 0 0 0 4px var(--lc-ring);
}

.lc-input:focus-within > i {
    color: var(--lc-blue);
}

.login .content .lc-field.is-invalid .form-control {
    border-color: var(--lc-danger);
    box-shadow: 0 0 0 4px rgba(237, 106, 91, .16);
}

.lc-field.is-invalid .lc-input > i {
    color: var(--lc-danger);
}

.lc-error {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 9px 2px 0;
    color: var(--lc-danger-text);
    font-size: 13px;
    line-height: 1.45;
    animation: lc-rise .2s ease both;
}

.lc-error i {
    margin-top: 2px;
}

/* ---------- Notices inside the card ---------- */

.lc-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    border: 1px solid rgba(237, 106, 91, .28);
    background: rgba(237, 106, 91, .1);
    color: var(--lc-danger-text);
    animation: lc-rise .25s ease both;
}

.lc-banner .lc-banner__icon {
    flex: none;
    margin-top: 2px;
    font-size: 15px;
}

/* One icon per kind, switched by class (Font Awesome may have replaced the <i> with an <svg>). */
.lc-banner .lc-banner__icon--ok,
.lc-banner .lc-banner__icon--info,
.lc-banner--success .lc-banner__icon--alert,
.lc-banner--info .lc-banner__icon--alert {
    display: none;
}

.lc-banner--success .lc-banner__icon--ok,
.lc-banner--info .lc-banner__icon--info {
    display: inline-block;
}

.lc-banner--info {
    border-color: rgba(92, 155, 209, .3);
    background: rgba(92, 155, 209, .1);
    color: var(--lc-blue-deep);
}

.lc-banner--success {
    border-color: rgba(42, 180, 192, .3);
    background: rgba(42, 180, 192, .1);
    color: #187b74;
}

.lc-banner__action {
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
    color: inherit;
    text-decoration: underline;
}

.lc-banner__action:hover {
    color: inherit;
}

.lc-banner__action:not([hidden]) + .lc-banner__action:not([hidden]) {
    margin-inline-start: 14px;
}

/* ---------- CAPTCHA ---------- */

.lc-captcha {
    display: flex;
    justify-content: center;
    margin: 18px 0 0;
    min-height: 78px;
    animation: lc-rise .25s ease both;
}

/* ---------- Buttons ---------- */

.login .content .lc-btn-primary {
    position: relative;
    width: 100%;
    height: 50px;
    margin-top: 22px;
    border-radius: 12px !important;
    color: #fff;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 12px 22px -12px rgba(42, 180, 192, .85) !important;
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease, opacity .2s ease;
}

.login .content .lc-btn-primary:hover {
    color: #fff;
    filter: brightness(1.05);
}

.login .content .lc-btn-primary:active {
    transform: translateY(0);
}

.login .content .lc-btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--lc-ring) !important;
}

.login .content .lc-btn-primary[disabled] {
    opacity: .55;
    transform: none;
    filter: none;
    box-shadow: none !important;
}

.lc-btn-primary.is-busy {
    cursor: progress;
}

.lc-btn-primary.is-busy[disabled] {
    opacity: .85;
}

.lc-btn-primary.is-done {
    background: linear-gradient(45deg, #23a69a 10%, #2AB4C0 100%);
}

.lc-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    animation: lc-spin .7s linear infinite;
}

.is-busy .lc-spinner {
    display: inline-block;
}

/* Secondary button on the password login page */

.lc-alt {
    margin: -14px 0 4px;
}

.login .content .lc-alt .login-options-divider {
    margin: 0 0 16px;
    color: var(--lc-muted, #667285);
    font-size: 11px;
    letter-spacing: .08em;
}

.login .content .lc-alt .login-options-divider::before,
.login .content .lc-alt .login-options-divider::after {
    border-bottom-color: rgba(38, 48, 61, .18);
}

.login .content .lc-btn-outline {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px !important;
    border: 1px solid rgba(92, 155, 209, .55) !important;
    background: rgba(255, 255, 255, .72);
    color: #2f6aa3;
    font-size: 15px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    text-decoration: none;
    transition: background-color .2s, border-color .2s, box-shadow .2s, transform .15s;
}

.login .content .lc-btn-outline i {
    font-size: 17px;
    color: #2AB4C0;
}

.login .content .lc-btn-outline:hover,
.login .content .lc-btn-outline:focus {
    background: #fff;
    border-color: #5C9BD1 !important;
    color: #2f6aa3;
    text-decoration: none;
}

.login .content .lc-btn-outline:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(92, 155, 209, .28) !important;
}

/* ---------- Links & footer ---------- */

.lc-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 22px 0 8px;
}

.lc-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--lc-blue-deep);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.lc-link:hover,
.lc-link:focus {
    background: rgba(92, 155, 209, .1);
    color: var(--lc-blue-deep);
    text-decoration: none;
}

.lc-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--lc-ring);
}

html[dir="rtl"] .lc-flip {
    transform: scaleX(-1);
}

.lc-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--lc-muted);
    font-size: 12px;
    text-align: center;
}

.lc-note i {
    color: var(--lc-teal);
}

/* ---------- Code entry ---------- */

.lc-otp {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin: 4px 0 0;
}

.lc-otp__slot {
    position: relative;
    flex: 0 1 52px;
    min-width: 0;
    height: 60px;
    border-radius: 14px;
    border: 1.5px solid #fff;
    background: var(--lc-field);
    color: var(--lc-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.lc-otp__slot.is-filled {
    background: #fff;
    animation: lc-digit .18s ease both;
}

.lc-otp.is-focused .lc-otp__slot.is-active {
    background: #fff;
    border-color: var(--lc-blue);
    box-shadow: 0 0 0 4px var(--lc-ring);
}

.lc-otp.is-focused .lc-otp__slot.is-active:not(.is-filled)::after {
    content: "";
    width: 2px;
    height: 26px;
    border-radius: 1px;
    background: var(--lc-blue);
    animation: lc-caret 1.05s steps(1) infinite;
}

.lc-otp__sep {
    flex: 0 0 10px;
    height: 2px;
    border-radius: 1px;
    background: #b9c3d1;
}

/* One real input over the slots: typing, paste, the SMS autofill of iOS / Android and screen readers all work on it. */
.login .content .lc-otp__input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: transparent;
    -webkit-text-fill-color: transparent;
    caret-color: transparent;
    font-size: 16px; /* no zoom-on-focus in iOS Safari */
    letter-spacing: 0;
    cursor: text;
    box-shadow: none;
}

.login .content .lc-otp__input::selection {
    background: transparent;
}

.login .content .lc-otp__input:-webkit-autofill {
    -webkit-text-fill-color: transparent !important;
    transition: background-color 600000s 0s;
}

.lc-otp.is-error .lc-otp__slot {
    border-color: var(--lc-danger);
    box-shadow: 0 0 0 3px rgba(237, 106, 91, .14);
}

.lc-otp.is-error {
    animation: lc-shake .4s cubic-bezier(.36, .07, .19, .97) both;
}

.lc-otp.is-success .lc-otp__slot {
    border-color: var(--lc-teal);
    background: #ecf9f8;
    color: #178077;
}

.lc-otp.is-disabled .lc-otp__slot {
    opacity: .55;
}

.lc-otp.is-disabled .lc-otp__input {
    cursor: not-allowed;
}

.lc-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 20px;
    margin-top: 16px;
    color: var(--lc-muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.lc-meta.is-warning {
    color: var(--lc-warning-text);
}

.lc-meta.is-expired {
    color: var(--lc-danger-text);
}

.lc-otp-error {
    justify-content: center;
    text-align: center;
}

.lc-resend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 18px;
    color: var(--lc-muted);
    font-size: 13.5px;
}

.lc-resend__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--lc-blue-deep);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s, color .2s;
    font-variant-numeric: tabular-nums;
}

.lc-resend__btn:hover:not([disabled]) {
    background: rgba(92, 155, 209, .12);
}

.lc-resend__btn:focus {
    outline: none;
}

.lc-resend__btn:focus-visible {
    box-shadow: 0 0 0 3px var(--lc-ring);
}

.lc-resend__btn[disabled] {
    color: var(--lc-muted);
    font-weight: 500;
    cursor: default;
}

.lc-ring {
    width: 18px;
    height: 18px;
    transform: rotate(-90deg);
    flex: none;
}

.lc-ring circle {
    fill: none;
    stroke-width: 2.4;
}

.lc-ring .lc-ring__track {
    stroke: #cdd5e0;
}

.lc-ring .lc-ring__value {
    stroke: var(--lc-blue);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.lc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Motion ---------- */

@keyframes lc-spin {
    to { transform: rotate(360deg); }
}

@keyframes lc-caret {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes lc-shake {
    15%, 85% { transform: translateX(-2px); }
    30%, 70% { transform: translateX(4px); }
    45%, 55% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
}

@keyframes lc-pop {
    from { opacity: 0; transform: scale(.7); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes lc-rise {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes lc-digit {
    from { transform: translateY(3px); }
    to { transform: translateY(0); }
}

@media (max-width: 468px) {
    .lc-otp {
        gap: 6px;
    }

    .lc-otp__slot {
        height: 54px;
        border-radius: 12px;
        font-size: 23px;
    }

    .lc-otp__sep {
        flex-basis: 6px;
    }

    .lc-captcha > div {
        transform: scale(.9);
        transform-origin: center top;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lc *,
    .lc *::before,
    .lc *::after,
    .lc-alt * {
        animation: none !important;
        transition: none !important;
    }
}
