/* หน้า login (shw_login.frm.tpl) */

.fa-user:before {
    content: "\f007";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fa-lock:before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fa-eye-slash:before {
    content: "\f070";
    position: absolute;
    top: 50%;
    right: -1.5%;
    transform: translate(-50%, -50%);
}

.fa-eye:before {
    content: "\f06e";
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(-50%, -50%);
}
.forgot-p:hover{
    color: #00A572!important;
    text-decoration: underline!important;
}

/* ===== popup แจ้งเตือนตอน login ไม่สำเร็จ ===== */
.swal-login-popup {
    border-radius: 16px;
    padding-bottom: 8px;
}

.swal-login-msg {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: #4f5754;
}

.swal-attempt {
    margin: 20px auto 4px auto;
    max-width: 330px;
    padding: 15px 18px;
    border: 1px solid #f3ddb2;
    border-radius: 12px;
    background-color: #fdf7ec;
}

.swal-attempt.is-last {
    border-color: #f2c9c4;
    background-color: #fdf1f0;
}

.swal-attempt-dots {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.swal-dot {
    width: 26px;
    height: 5px;
    margin: 0 4px;
    border-radius: 3px;
    background-color: #ecdcbc;
}

.swal-dot.used {
    background-color: #e8a33d;
}

.swal-attempt.is-last .swal-dot {
    background-color: #f0cfcb;
}

.swal-attempt.is-last .swal-dot.used {
    background-color: #d9534f;
}

.swal-attempt-text {
    font-size: 14px;
    line-height: 1.5;
    color: #a8761c;
}

.swal-attempt.is-last .swal-attempt-text {
    color: #c9403c;
}

/* ===== loading ตอนกำลัง login ===== */
.login-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.login-loading.is-show {
    opacity: 1;
    visibility: visible;
}

.login-loading-inner {
    text-align: center;
}

.login-loading-ring {
    display: block;
    width: 76px;
    height: 76px;
    margin: 0 auto 22px auto;
    transform-origin: center;
    animation: login-loading-rotate 1.9s linear infinite;
}

.login-loading-track {
    fill: none;
    stroke: #e9efe6;
    stroke-width: 5;
}

.login-loading-arc {
    fill: none;
    stroke: url(#login_loading_grad);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 1, 180;
    stroke-dashoffset: 0;
    animation: login-loading-dash 1.6s ease-in-out infinite;
}

.login-loading-text {
    margin: 0;
    font-size: 16px;
    color: #3c423f;
    animation: login-loading-pulse 1.6s ease-in-out infinite;
}

@keyframes login-loading-rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes login-loading-dash {
    0% {
        stroke-dasharray: 1, 180;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 130, 180;
        stroke-dashoffset: -30;
    }
    100% {
        stroke-dasharray: 130, 180;
        stroke-dashoffset: -172;
    }
}

@keyframes login-loading-pulse {
    0%, 100% {
        opacity: .5;
    }
    50% {
        opacity: 1;
    }
}

/* เครื่องที่ตั้งค่าลดการเคลื่อนไหวไว้ ให้แสดงวงนิ่ง ๆ แทน */
@media (prefers-reduced-motion: reduce) {
    .login-loading-ring,
    .login-loading-arc,
    .login-loading-text {
        animation: none;
    }
    .login-loading-arc {
        stroke-dasharray: 130, 180;
    }
}
