﻿/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&display=swap");

@font-face {
    font-family: 'Inter'; /* Tên font để gọi */
    src: url('/assets/fonts/inter/Inter-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 100 900; /* vì đây là variable font */
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
}

/*=============== VARIABLES CSS ===============*/
:root {
    /*========== Colors ==========*/
    /*Color mode HSL(hue, saturation, lightness)*/
    --first-color: hsl(208, 92%, 54%);
    --first-color-alt: hsl(208, 88%, 50%);
    --title-color: hsl(220, 68%, 4%);
    --white-color: hsl(0, 0%, 100%);
    --text-color: hsl(220, 15%, 66%);
    --body-color: hsl(0, 0%, 100%);
    --container-color: hsl(220, 50%, 97%);
    /*========== Font and typography ==========*/
    /*.5rem = 8px | 1rem = 16px ...*/
    --body-font: "Montserrat", system-ui;
    --big-font-size: 1.5rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --tiny-font-size: .688rem;
    /*========== Font weight ==========*/
    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;
    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
    :root {
        --big-font-size: 3rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
        --tiny-font-size: .75rem;
    }
}

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body,
input,
button {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

body {
    background-color: var(--body-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
}

input,
button {
    border: none;
    outline: none;
}

a {
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
    max-width: 1120px;
    margin-inline: 1.5rem;
}

.grid {
    display: grid;
    gap: 1rem;
}

/*=============== LOGIN  ===============*/
.login {
    position: relative;
    height: 100vh;
    align-items: center;
    overflow: hidden;
}

.login__blob {
    display: none;
}

.login__title {
    font-size: var(--big-font-size);
    color: var(--title-color);
    text-align: center;
    margin-bottom: 2rem;
}

.login__box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--container-color);
    border-radius: 1rem;
}

.login__input {
    background: none;
    width: 100%;
    padding: 1.5rem 2.5rem 1.5rem 1.25rem;
    font-weight: var(--font-semi-bold);
    border: 3px solid transparent;
    border-radius: 1rem;
    z-index: 1;
    transition: border-color .4s;
}

    .login__input:autofill {
        transition: background-color 6000s, color 6000s;
    }

.login__label {
    position: absolute;
    left: 1.25rem;
    font-weight: var(--font-semi-bold);
    transition: transform .4s, font-size .4s, color .4s;
}

.login__icon {
    position: absolute;
    right: 1rem;
    font-size: 1.25rem;
    transition: color .4s;
}

.login__password {
    cursor: pointer;
    z-index: 10;
}

.login__forgot {
    display: block;
    font-size: var(--small-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--text-color);
    transition: color .4s;
}

.login__options {
    display: flex;
    justify-content: space-between; /* Đẩy hai phần tử ra hai đầu */
    align-items: center;
    margin-top: 1rem; /* Tạo khoảng cách với phần tử phía trên */
}

.login__forgot:hover {
    color: var(--first-color);
}

.login__button {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    background-color: var(--first-color);
    color: var(--white-color);
    font-weight: var(--font-semi-bold);
    padding-block: 1.5rem;
    border-radius: 4rem;
    margin-block: 2rem;
    cursor: pointer;
    transition: background-color .4s, box-shadow .4s;
}

    .login__button:hover {
        background-color: var(--first-color-alt);
        box-shadow: 0 8px 24px hsla(208, 92%, 32%, .3);
    }

.login__social {
    margin-bottom: 2rem;
}

.login__social-title {
    text-align: center;
    font-size: var(--small-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--title-color);
    margin-bottom: 1rem;
}

.login__social-img {
    width: 1rem;
}

.login__social-links {
    display: flex;
    justify-content: center;
    column-gap: 1.5rem;
}

.login__social-link {
    width: 32px;
    height: 32px;
    background-color: var(--body-color);
    box-shadow: 0 4px 8px hsla(0, 0%, 0%, .1);
    border-radius: .5rem;
    display: grid;
    place-items: center;
    transition: transform .4s;
}

    .login__social-link:hover {
        transform: translateY(-.25rem);
    }

.login__switch {
    text-align: center;
    font-size: var(--small-font-size);
    color: black;
}

    .login__switch a {
        background: none;
        color: var(--first-color);
        font-size: var(--small-font-size);
        font-weight: var(--font-semi-bold);
        cursor: pointer;
        transition: color .4s;
    }

        .login__switch a:hover {
            color: var(--first-color-alt);
        }

.login__access,
.login__register {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    transition: transform .4s, opacity .4s .1s;
    top: 1rem;
}

.login__register {
    transform: translateX(15rem);
    opacity: 0;
    pointer-events: none;
}

/* Input focus move up label */
.login__input:focus ~ .login__label {
    transform: translateY(-12px);
    font-size: var(--tiny-font-size);
}

.login__input:focus {
    padding-block: 2rem 1rem;
}

/* Input focus sticky top label */
.login__input:not(:placeholder-shown).login__input:not(:focus) ~ .login__label {
    transform: translateY(-12px);
    font-size: var(--tiny-font-size);
}

.login__input:not(:placeholder-shown).login__input:not(:focus) {
    padding-block: 2rem 1rem;
}

/* Input focus color */
.login__input:focus {
    border-color: var(--first-color);
}

    .login__input:focus ~ .login__label,
    .login__input:focus ~ .login__icon {
        color: var(--first-color);
    }

/* Show hide login & create account */
.active .login__access {
    transform: translateX(15rem);
    opacity: 0;
    pointer-events: none;
}

.login__register {
    transform: translateX(0);
    opacity: 1;
    pointer-events: initial;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
    .container {
        margin-inline: 1rem !important;
    }
}
@media screen and (min-width: 321px) and (max-width: 1149px) {
    .grid--mobile {
        display: flex;
        gap: 1rem;
        padding: 1rem;
    }

    .register__input--mobile {
        padding: 1rem 0.2rem !important;
        text-align: center; /* căn giữa ngang */
    }

    .login__box--mobile {
        border: 1px solid #ccc;
        border-radius: 5px;
        padding: 4px;
        transition: border-color 0.3s ease, box-shadow 0.3s ease; /* animation mượt */
    }

        .login__box--mobile:focus-within {
            border-color: red !important;
            box-shadow: 0 0 8px rgba(255, 0, 0, 0.4); /* hiệu ứng glow */
        }
    .container {
        margin-inline: unset !important;
    }
}
@media screen and (min-width: 321px) and (max-width: 539px) {
    
    .login__options {
        padding-left: 5px;
        padding-right: 5px;
    }
    .login__access, .login__register {
        top: 7rem !important;
    }
}
/* For medium devices */
@media screen and (min-width: 540px) {
    .login__area {
        width: 380px;
        margin-inline: auto;
    }

    
}

@media screen and (min-width: 350px) and (max-height: 600px) {
    .login {
        height: 760px;
    }
}

/* For large devices */
@media screen and (min-width: 1150px) {
    .container {
        margin-inline: auto;
    }

    .login__area {
        width: 460px;
        margin: initial;
    }

    .login__access,
    .login__register {
        width: 600px;
        top: 7rem !important;
    }

    .login__title {
        text-align: initial;
        margin-bottom: 3rem;
    }

    .login__button {
        margin-bottom: 3rem;
    }

    .login__group {
        grid-template-columns: repeat(2, 1fr);
    }

    .login__otp {
        grid-template-columns: repeat(6, 1fr);
    }

    .login__blob {
        display: block;
        height: 100vh;
        position: absolute;
        top: 0;
        right: 0;
    }

    .login__img {
        transform: translate(0rem, 0rem);
    }
}

@media screen and (max-height: 730px) {
    .login__input:not(:placeholder-shown).login__input:not(:focus) {
        padding-block: 1.5rem 0.5rem;
    }
    .login__title {
        text-align: initial;
        margin-bottom: 2rem;
        margin-top: -80px;
    }
    .login__input {
        background: none;
        width: 100%;
        padding: 1rem 2rem 1rem 0.75rem;
        font-weight: var(--font-semi-bold);
        border: 3px solid transparent;
        border-radius: 1rem;
        z-index: 1;
        transition: border-color .4s;
    }
}
.login__area {
    position: relative;
}
.formRegister_Zero,
.formRegister_One,
.formRegister_Two,
.formRegister_Three,
.formRegister_Four {
    position: absolute;
    top: 80%;
    left: 0;
    width: 100%;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform: translateX(15rem);
    opacity: 0;
    pointer-events: none;
}

    .formRegister_Zero.active,
    .formRegister_One.active,
    .formRegister_Two.active,
    .formRegister_Three.active,
    .formRegister_Four.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: initial;
    }




.register__input {
    background: none;
    width: 100%;
    padding: 2.2rem;
    font-weight: var(--font-semi-bold);
    border: 3px solid transparent;
    border-radius: 1rem;
    z-index: 1;
    transition: border-color .4s;
}

    .register__input:autofill {
        transition: background-color 6000s, color 6000s;
    }


    /* Input focus move up label */
    .register__input:focus ~ .login__label {
        transform: translateY(-12px);
        font-size: var(--tiny-font-size);
    }

    .register__input:focus {
        padding-block: 1rem 1rem;
    }

    /* Input focus sticky top label */
    .register__input:not(:placeholder-shown).register__input:not(:focus) ~ .login__label {
        transform: translateY(-12px);
        font-size: var(--tiny-font-size);
    }

    .register__input:not(:placeholder-shown).register__input:not(:focus) {
        /* padding-block: 1rem 1rem; */
    }

/* Input focus color */
.loginregister__input__input:focus {
    border-color: var(--first-color);
}

.register__input:focus ~ .login__label,
.register__input:focus ~ .login__icon {
    color: var(--first-color);
}

#StartCreateAccount:disabled {
    background-image: linear-gradient(225deg, #9cc8fc, #9cc8fc);
    cursor: not-allowed;
    background-color: #9cc8fc;
    box-shadow: none;
}

#CreateAccount:disabled {
    background-image: linear-gradient(225deg, #9cc8fc, #9cc8fc);
    cursor: not-allowed;
    background-color: #9cc8fc;
    box-shadow: none;
}

#ChangePassAccount:disabled {
    background-image: linear-gradient(225deg, #9cc8fc, #9cc8fc);
    cursor: not-allowed;
    background-color: #9cc8fc;
    box-shadow: none;
}

#StartChangeAccount:disabled {
    background-image: linear-gradient(225deg, #9cc8fc, #9cc8fc);
    cursor: not-allowed;
    background-color: #9cc8fc;
    box-shadow: none;
}
#CheckCompany:disabled {
    background-image: linear-gradient(225deg, #9cc8fc, #9cc8fc);
    cursor: not-allowed;
    background-color: #9cc8fc;
    box-shadow: none;
}

#btnVerifyOTP:disabled {
    background-image: linear-gradient(225deg, #9cc8fc, #9cc8fc);
    cursor: not-allowed;
    background-color: #9cc8fc;
    box-shadow: none;
}


.toast-message {
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s;
}

.toast-success {
    background-color: #4CAF50; /* Màu xanh lá cây cho thành công */
}

.toast-error {
    background-color: #F44336; /* Màu đỏ cho lỗi */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        /* Sửa đổi: Đẩy thông báo xuống dưới để nó trượt lên */
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        /* Sửa đổi: Trở về vị trí ban đầu (không dịch chuyển) */
        transform: translateY(0);
    }
}

.dots-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px; /* Chiều rộng tổng thể của loader */
    height: 20px;
    margin-left: 10px;
}

    /* Định dạng cho từng dấu chấm */
    .dots-loader span {
        display: block;
        width: 8px;
        height: 8px;
        margin: 0 4px;
        background-color: #fff; /* Màu sắc của dấu chấm */
        border-radius: 50%;
        animation: bounce 1.2s infinite ease-in-out both;
    }

        .dots-loader span:nth-child(1) {
            animation-delay: -0.32s;
        }

        .dots-loader span:nth-child(2) {
            animation-delay: -0.16s;
        }

/* Định nghĩa animation */
@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

.login__input[readonly] {
    /* Đặt màu nền giống disabled */
    background-color: #e9ecef;
    /* Làm mờ chữ */
    color: #6c757d;
    /* Thay đổi con trỏ chuột */
    cursor: not-allowed;
    /* Có thể làm mờ thêm */
    opacity: 0.6;
}

small:empty {
    display: none;
}

.countdown-center {
    text-align: center;
    /* Hoặc dùng display flex để căn giữa */
    display: flex;
    justify-content: center;
}
