/*!
 * popup-login.css
 * Style untuk popup login ulang openLoginDialog() (Email -> OTP -> Password)
 *
 * @author  Fakhri Adi Saputra
 * @created 2026-11-16
 *
 * Semua selector di-scope ke .lp-overlay / #popup-login-dialog
 * supaya tidak bentrok dengan .ar-form, .ar-input, Bootstrap 3, dll.
 */

body.lp-lock-scroll {overflow: hidden !important;}

.lp-overlay {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    z-index: 2147483647 !important;          /* nilai maksimum, selalu di atas modal lain */
    display: flex; align-items: center; justify-content: center;
    padding: 16px; box-sizing: border-box; overflow-y: auto;
    background: rgba(17, 24, 39, .6);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: #1f2937; line-height: 1.45; text-align: left;
}
.lp-overlay *, .lp-overlay *::before, .lp-overlay *::after {box-sizing: border-box;}
.lp-overlay.lp-anim {animation: lpFadeIn .18s ease-out;}
.lp-overlay.lp-anim .lp-dialog {animation: lpPopIn .22s cubic-bezier(.2, .9, .3, 1.2);}

.lp-dialog {
    position: relative; width: 100%; max-width: 420px; margin: auto;
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .08);
}
.lp-dialog::before {content: ""; display: block; height: 4px; background: linear-gradient(90deg, #e92030, #ff5a66);}
.lp-body {padding: 26px 28px 20px;}

/* Header */
.lp-header {text-align: center; margin-bottom: 18px;}
.lp-badge {
    width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #fdecee; color: #e92030;
}
.lp-badge svg {width: 24px; height: 24px;}
.lp-header h2 {margin: 0 0 4px; font-size: 20px; font-weight: 700; color: #111827; letter-spacing: -.01em;}
.lp-subtitle {margin: 0; font-size: 13.5px; color: #6b7280;}

/* Step indicator */
.lp-steps {display: flex; gap: 6px; margin: 0 0 6px;}
.lp-steps > span {flex: 1; height: 4px; border-radius: 4px; background: #e5e7eb; transition: background .25s;}
.lp-steps > span.is-done, .lp-steps > span.is-current {background: #e92030;}
.lp-steps > span.is-current {opacity: .55;}
.lp-steplabel {font-size: 12px; color: #9ca3af; margin: 0 0 14px; font-weight: 600; letter-spacing: .02em;}

/* Step container */
.lp-step {display: none; flex-direction: column; gap: 12px; margin: 0;}
.lp-step.is-active {display: flex;}

/* Alert */
.lp-alert {
    font-size: 13px; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent;
    word-wrap: break-word; overflow-wrap: anywhere;
}
.lp-alert.is-info {background: #f3f4f6; color: #4b5563;}
.lp-alert.is-error {background: #fef2f2; color: #b91c1c; border-color: #fecaca;}
.lp-alert.is-success {background: #ecfdf5; color: #047857; border-color: #a7f3d0;}
.lp-alert.is-info:empty {display: none;}
.lp-shake {animation: lpShake .35s;}

/* Label / hint */
.lp-label {display: block; margin: 2px 0 -6px; font-size: 13px; font-weight: 600; color: #374151;}
.lp-hint {margin: -4px 0 0; font-size: 12.5px; color: #6b7280;}

/* Input field */
.lp-field {position: relative;}
.lp-field > svg {
    position: absolute; left: 13px; top: 50%; width: 18px; height: 18px;
    transform: translateY(-50%); color: #9ca3af; pointer-events: none;
}
.lp-field input {
    display: block; width: 100%; height: 46px; margin: 0;
    padding: 0 14px 0 42px; font-size: 15px; color: #111827;
    background: #fff; border: 1.5px solid #d1d5db; border-radius: 10px;
    outline: none; box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.lp-field.has-peek input {padding-right: 46px;}
.lp-field input::placeholder {color: #9ca3af;}
.lp-field input:focus {border-color: #e92030; box-shadow: 0 0 0 3px rgba(233, 32, 48, .15);}
.lp-field:focus-within > svg {color: #e92030;}
.lp-field input[readonly] {
    background: #f3f4f6; color: #374151; border-color: #e5e7eb;
    cursor: default; box-shadow: none;
}
.lp-field input[readonly]:focus {border-color: #d1d5db; box-shadow: 0 0 0 3px rgba(156, 163, 175, .18);}
.lp-field input.is-invalid {border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);}
.lp-peek {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px;
    background: transparent; color: #6b7280; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.lp-peek:hover {background: #f3f4f6; color: #111827;}
.lp-peek:focus-visible {outline: 2px solid #e92030; outline-offset: 1px;}
.lp-peek svg {width: 18px; height: 18px;}
.lp-capslock {display: none; margin-top: -6px; font-size: 12px; color: #b45309;}
.lp-capslock.is-on {display: block;}

/* OTP */
.lp-otp {display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;}
.lp-otp input {
    width: 100%; height: 54px; min-width: 0; margin: 0; padding: 0;
    text-align: center; font-size: 22px; font-weight: 700; color: #111827;
    font-variant-numeric: tabular-nums;
    background: #f9fafb; border: 1.5px solid #d1d5db; border-radius: 10px;
    outline: none; box-shadow: none; caret-color: #e92030;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.lp-otp input:focus {background: #fff; border-color: #e92030; box-shadow: 0 0 0 3px rgba(233, 32, 48, .15);}
.lp-otp input.is-filled {background: #fff; border-color: #9ca3af;}
.lp-otp input.is-invalid {border-color: #dc2626; background: #fef2f2;}
.lp-otp input[readonly] {opacity: .6;}

/* Account chip */
.lp-chip {
    display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px;
    background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 999px; font-size: 13px;
}
.lp-chip svg {width: 16px; height: 16px; flex: none; color: #6b7280;}
.lp-chip-text {flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6b7280;}
.lp-chip-text strong {color: #111827; font-weight: 600;}

/* Buttons */
.lp-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 46px; margin: 4px 0 0; padding: 0 16px;
    font-size: 15px; font-weight: 700; color: #fff; text-transform: none;
    background: #e92030; border: 0; border-radius: 10px; cursor: pointer;
    box-shadow: 0 4px 12px rgba(233, 32, 48, .25); transition: background .15s, transform .05s;
}
.lp-btn:hover {background: #cc1826;}
.lp-btn:active {transform: translateY(1px);}
.lp-btn:focus-visible {outline: 3px solid rgba(233, 32, 48, .35); outline-offset: 2px;}
.lp-btn:disabled, .lp-btn.is-loading {opacity: .7; cursor: progress !important; box-shadow: none;}
.lp-link {
    align-self: center; padding: 6px 10px; margin: 0;
    font-size: 13.5px; font-weight: 600; color: #6b7280;
    background: none; border: 0; border-radius: 6px; cursor: pointer;
}
.lp-link:hover {color: #111827; background: #f3f4f6;}
.lp-link-sm {
    flex: none; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: #e92030;
    background: #fff; border: 1px solid #f3c4c8; border-radius: 999px; cursor: pointer;
}
.lp-link-sm:hover {background: #fdecee;}
.lp-spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
    animation: lpSpin .7s linear infinite;
}

/* Field username tersembunyi untuk password manager */
.lp-sr-only {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

@media (max-width: 420px) {
    .lp-body {padding: 22px 18px 16px;}
    .lp-otp {gap: 6px;}
    .lp-otp input {height: 48px; font-size: 20px;}
}
@media (prefers-reduced-motion: reduce) {
    .lp-overlay.lp-anim, .lp-overlay.lp-anim .lp-dialog, .lp-shake {animation: none !important;}
}

@keyframes lpFadeIn {from {opacity: 0;} to {opacity: 1;}}
@keyframes lpPopIn {from {opacity: 0; transform: translateY(12px) scale(.97);} to {opacity: 1; transform: none;}}
@keyframes lpSpin {to {transform: rotate(360deg);}}
@keyframes lpShake {0%, 100% {transform: none;} 20%, 60% {transform: translateX(-5px);} 40%, 80% {transform: translateX(5px);}}


#ahmmfa_otp.ahmmfa-lp {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    z-index: 2147483000;                 /* tinggi, tapi tetap di bawah popup relogin (2147483647) */
    display: flex; align-items: center; justify-content: center;
    width: auto; height: auto; margin: 0; padding: 16px;
    box-sizing: border-box; overflow-y: auto;
    background: rgba(17, 24, 39, .6);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: #1f2937; line-height: 1.45; text-align: left;
    animation: ahmmfaLpFadeIn .18s ease-out;
}
#ahmmfa_otp.ahmmfa-lp *, #ahmmfa_otp.ahmmfa-lp *::before, #ahmmfa_otp.ahmmfa-lp *::after {box-sizing: border-box;}
 
/* Kartu */
#ahmmfa_otp.ahmmfa-lp .ahmmfa_content {
    position: relative; width: 100%; max-width: 420px; height: auto; margin: auto; padding: 0;
    background: #fff; border: 0; border-radius: 16px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .08);
    transform: none; top: auto; left: auto;
    animation: ahmmfaLpPopIn .22s cubic-bezier(.2, .9, .3, 1.2);
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_content::before {
    content: ""; display: block; height: 4px; background: linear-gradient(90deg, #e92030, #ff5a66);
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_wrapper {
    width: auto; height: auto; margin: 0; padding: 26px 28px 20px;
    background: transparent; border: 0;
}
 
/* Header */
#ahmmfa_otp.ahmmfa-lp .ahmmfa_header {
    margin: 0 0 6px; padding: 0; text-align: center;
    background: transparent; border: 0; color: inherit;
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa-lp-badge {
    width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #fdecee; color: #e92030;
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa-lp-badge svg {width: 24px; height: 24px;}
#ahmmfa_otp.ahmmfa-lp .ahmmfa-lp-title {
    margin: 0; font-size: 20px; font-weight: 700; color: #111827;
    letter-spacing: -.01em; line-height: 1.3; text-transform: none;
}
 
/* Body */
#ahmmfa_otp.ahmmfa-lp .ahmmfa_body {margin: 0; padding: 0; background: transparent; border: 0;}
#ahmmfa_otp.ahmmfa-lp .ahmmfa-lp-center {display: flex; flex-direction: column; align-items: stretch; gap: 14px;}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_inputs_guidance {
    margin: 0 0 4px; padding: 0; text-align: center; font-size: 13.5px; color: #6b7280;
}
 
/* OTP boxes */
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_inputs {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
    width: 100%; margin: 0; padding: 0;
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_input {
    width: auto; min-width: 0; margin: 0; padding: 0; float: none; display: block;
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_input input,
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_input input.form-control {
    display: block; width: 100%; height: 54px; min-width: 0; margin: 0; padding: 0;
    text-align: center; font-size: 22px; font-weight: 700; color: #111827;
    font-variant-numeric: tabular-nums; line-height: normal;
    background: #f9fafb; border: 1.5px solid #d1d5db; border-radius: 10px;
    outline: none; box-shadow: none; caret-color: #e92030;
    -webkit-appearance: none; appearance: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_input input:focus {
    background: #fff; border-color: #e92030; box-shadow: 0 0 0 3px rgba(233, 32, 48, .15);
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_input input:valid:not(:focus) {background: #fff; border-color: #9ca3af;}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_input input:disabled,
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_input input[readonly] {opacity: .6; cursor: not-allowed;}
 
/* Kirim kode ke Email */
#ahmmfa_otp.ahmmfa-lp .ahmmfa-lp-resend {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 6px;
    font-size: 12.5px; color: #6b7280; text-align: center;
}
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_sendMail,
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_sendMail.btn-link {
    display: inline; width: auto; height: auto; margin: 0; padding: 2px 4px;
    font-size: 12.5px; font-weight: 600; line-height: 1.4; color: #e92030;
    background: none; border: 0; border-radius: 4px; box-shadow: none;
    text-decoration: none; white-space: normal; text-align: center;
}
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_sendMail:hover,
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_sendMail:focus {color: #cc1826; text-decoration: underline; outline: none;}
/* Saat "Mengirim Email..." / countdown "Tunggu N detik...": tombol berubah jadi badge status,
   teks pengantar disembunyikan supaya tidak terlihat seperti tombol yang masih bisa diklik */
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_sendMail:disabled,
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_sendMail.disabled,
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_sendMail[disabled]:hover {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; font-weight: 500; color: #4b5563;
    background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 999px;
    text-decoration: none; cursor: default; opacity: 1;
}
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_sendMail:disabled::before {
    content: ""; flex: none; width: 14px; height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa-lp-resend:has(#ahmmfa_otp_sendMail:disabled) > span {display: none;}
 
/* Alert
   ahmmfa_otp_sendMail mengisi teks polos lewat .html(...) lalu .fadeIn()/.hide(),
   jadi kotaknya ada di container ini. Jangan set display di sini. */
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_alert {
    margin: 14px 0 0; padding: 10px 12px;
    font-size: 13px; line-height: 1.45; text-align: left;
    color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px;
    word-wrap: break-word; overflow-wrap: anywhere;
}
/* Kalau suatu saat diisi elemen .alert Bootstrap, container tidak ikut jadi kotak (hindari kotak dobel) */
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_alert:has(> .alert) {padding: 0; background: none; border: 0;}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_alert .alert {
    margin: 0; padding: 10px 12px; font-size: 13px; border-radius: 10px; box-shadow: none;
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_alert .alert-danger {background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_alert .alert-success {background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_alert .alert-info {background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb;}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_alert .alert-warning {background: #fffbeb; color: #b45309; border: 1px solid #fde68a;}
 
/* Footer: Kirim di atas (full width), Logout di bawah sebagai link */
#ahmmfa_otp.ahmmfa-lp .ahmmfa_footer {
    display: flex; flex-direction: column-reverse; align-items: stretch; gap: 6px;
    margin: 16px 0 0; padding: 0; background: transparent; border: 0;
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_footer_left,
#ahmmfa_otp.ahmmfa-lp .ahmmfa_footer_right {
    width: auto; margin: 0; padding: 0; float: none; text-align: center;
}
 
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_submit,
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_submit.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 46px; margin: 0; padding: 0 16px;
    font-size: 15px; font-weight: 700; line-height: 1; color: #fff; text-transform: none;
    background: #e92030; border: 0; border-radius: 10px;
    box-shadow: 0 4px 12px rgba(233, 32, 48, .25);
    transition: background .15s, transform .05s; text-shadow: none; background-image: none;
}
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_submit:hover,
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_submit:focus {background: #cc1826; color: #fff; outline: none;}
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_submit:focus-visible {outline: 3px solid rgba(233, 32, 48, .35); outline-offset: 2px;}
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_submit:active {transform: translateY(1px); background: #b51522;}
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_submit:disabled,
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_submit.disabled,
#ahmmfa_otp.ahmmfa-lp #ahmmfa_otp_submit[disabled]:hover {
    background: #e92030; opacity: .45; box-shadow: none; transform: none; cursor: not-allowed;
}
 
#ahmmfa_otp.ahmmfa-lp .ahmmfa_modal_logout,
#ahmmfa_otp.ahmmfa-lp .ahmmfa_modal_logout.btn-danger {
    display: inline-block; width: auto; height: auto; margin: 0; padding: 6px 12px;
    font-size: 13.5px; font-weight: 600; line-height: 1.4; color: #6b7280;
    background: none; border: 0; border-radius: 6px; box-shadow: none;
    text-shadow: none; background-image: none;
}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_modal_logout:hover,
#ahmmfa_otp.ahmmfa-lp .ahmmfa_modal_logout:focus {color: #b91c1c; background: #fef2f2; outline: none;}
#ahmmfa_otp.ahmmfa-lp .ahmmfa_modal_logout:disabled {color: #9ca3af; background: none; cursor: not-allowed;}
 
@media (max-width: 420px) {
    #ahmmfa_otp.ahmmfa-lp .ahmmfa_wrapper {padding: 22px 18px 16px;}
    #ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_inputs {gap: 6px;}
    #ahmmfa_otp.ahmmfa-lp .ahmmfa_otp_input input {height: 48px; font-size: 20px;}
}
@media (prefers-reduced-motion: reduce) {
    #ahmmfa_otp.ahmmfa-lp, #ahmmfa_otp.ahmmfa-lp .ahmmfa_content {animation: none !important;}
}
 
@keyframes ahmmfaLpFadeIn {from {opacity: 0;} to {opacity: 1;}}
@keyframes ahmmfaLpPopIn {from {opacity: 0; transform: translateY(12px) scale(.97);} to {opacity: 1; transform: none;}}