/*
 * Login redesign — image slider + entrance animation
 * ประยุกต์จากดีไซน์ split สองคอลัมน์ (image-slider login)
 * โหลดต่อจาก bento-theme.css จึง override เฉพาะที่จำเป็น (scope ที่ .wrapper.login เท่านั้น)
 */

/* ===== สไลด์รูป (crossfade) ===== */
.wrapper.login .auth-slider .login-background {
    overflow: hidden;
}

/* ใช้ .login-background img.auth-slide เพื่อให้ specificity ชนะ rule เดิมที่ตั้ง opacity:1 */
.wrapper.login .login-background img.auth-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .9s ease, transform 6s ease;
    will-change: opacity, transform;
}

.wrapper.login .login-background img.auth-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

/* จุดบอกตำแหน่งสไลด์ */
.wrapper.login .auth-dots {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 16px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.wrapper.login .auth-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
    box-shadow: 0 1px 3px rgba(9, 9, 11, .35);
    cursor: pointer;
    transition: background-color .3s ease, width .3s ease;
}

.wrapper.login .auth-dot:hover {
    background: rgba(255, 255, 255, .85);
}

.wrapper.login .auth-dot.is-active {
    width: 22px;
    background: #fff;
}

/* ===== Desktop: วางรูปสไลด์ไว้ฝั่งซ้าย, ฟอร์มฝั่งขวา ===== */
@media screen and (min-width: 900px) {
    .wrapper.login .reg__image {
        order: 1 !important;
    }

    .wrapper.login .reg__section {
        order: 2 !important;
    }
}

/* ===== อนิเมชันเข้า (staggered fade-up) ของฟอร์ม ===== */
@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wrapper.login .reg__box > * {
    animation: authFadeUp .55s cubic-bezier(.22, 1, .36, 1) both;
}

.wrapper.login .reg__box > .login-seal   { animation-delay: .05s; }
.wrapper.login .reg__box > .reg__eyebrow { animation-delay: .10s; }
.wrapper.login .reg__box > .reg__brand   { animation-delay: .15s; }
.wrapper.login .reg__box > .login-welcome{ animation-delay: .18s; }
.wrapper.login .reg__box > .reg__heading { animation-delay: .22s; }
.wrapper.login .reg__box > .form         { animation-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
    .wrapper.login .auth-slide,
    .wrapper.login .reg__box > * {
        animation: none !important;
        transition: opacity .2s ease !important;
        transform: none !important;
    }
}

/* ===== ข้อความแจ้งผลบนหน้าล็อกอิน: การ์ดในฟอร์ม (ไม่ลอยเป็น toast ไม่โดนอะไรทับ) ===== */
.login-messages { margin: 0 0 4px; }
.login .login-messages .main__content.notice-flash {
    margin: 0 0 14px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    animation: loginMsgIn .3s cubic-bezier(.21, 1.02, .73, 1);
}
.login .login-messages .notification {
    position: relative;
    margin: 0;
    padding: 12px 16px 12px 44px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.55;
    border: 1px solid #dde7f5;
    background: #fafcff;
    color: #3f5680;
}
.login .login-messages .notification::before {
    content: "!";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    background: #7286a3;
    color: #fff;
}
.login .login-messages .notification.red {
    border-color: #fecdd3;
    background: #fff5f6;
    color: #9f1239;
}
.login .login-messages .notification.red::before { background: #e11d48; }
.login .login-messages .notification.green {
    border-color: #bbe5cb;
    background: #f2fbf6;
    color: #14532d;
}
.login .login-messages .notification.green::before { content: "\2713"; background: #16a34a; }
.login .login-messages .notification.orange,
.login .login-messages .notification.blue {
    border-color: #fde4bd;
    background: #fffaf1;
    color: #92400e;
}
.login .login-messages .notification.orange::before,
.login .login-messages .notification.blue::before { background: #d97706; }
.login .login-messages .notification b { font-weight: 700; }
@keyframes loginMsgIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}
