/* public/css/auth.css */

:root {
    --primary-golden: #1a2a40;
    /* Vàng đồng đậm */
    --light-golden: #1a2a40;
    /* Vàng đồng nhạt */
    --background-light: #F8F8F8;
    /* Nền sáng nhẹ */
    --text-dark: #333333;
    /* Chữ tối */
    --text-light: #FFFFFF;
    /* Chữ sáng */
    --border-color: #E0E0E0;
    /* Màu viền */
    --error-color: #E74C3C;
    /* Màu lỗi */
    --box-shadow: rgba(0, 0, 0, 0.08);
}

body.auth-background {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--background-light);
    /* Nền tổng thể của trang */
    color: var(--text-dark);
    line-height: 1.6;
    background-image: url('/images/auth-bg-texture.png');
    /* Có thể thêm một texture nhẹ nhàng */
    background-size: cover;
    background-position: center;
}

.auth-container {
    display: flex;
    max-width: 1200px;
    /* Tăng kích thước tổng thể */
    width: 90%;
    margin: 40px auto;
    /* Tăng margin để form không bị dính vào cạnh */
    background-color: var(--text-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px var(--box-shadow);
}

/* Cột Form */
.auth-form-column {
    flex: 1;
    padding: 60px 50px;
    /* Tăng padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--text-light);
}

.auth-form-column h2 {
    font-size: 2.5rem;
    /* Kích thước chữ lớn hơn */
    margin-bottom: 20px;
    color: var(--primary-golden);
    font-weight: 700;
}

.auth-form-column .social-prompt {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
}

.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-login a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 55px;
    /* Kích thước nút lớn hơn */
    height: 55px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: white;
    color: var(--text-light);
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    line-height: 0;
}

.social-login a i {
    line-height: 1;
}

.social-login a.facebook {
    background-color: #1877F2;
    /* Facebook blue */
}

.social-login a.google {
    background-color: #DB4437;
    /* Google red */
}

.social-login a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    width: 100%;
    margin: 20px 0 30px;
    /* Tăng khoảng cách */
    color: #999;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

/* Form Groups */
.form-group {
    position: relative;
    margin-bottom: 25px;
    /* Tăng khoảng cách giữa các group */
    width: 100%;
    max-width: 380px;
    /* Giới hạn chiều rộng của input */
}

.form-group .input-icon {
    position: absolute;
    left: 18px;
    /* Di chuyển icon vào trong */
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
}

.form-group input {
    width: calc(100% - 40px);
    /* Giảm chiều rộng để chừa chỗ cho icon */
    padding: 15px 15px 15px 50px;
    /* Tăng padding, chừa chỗ cho icon */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-golden);
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.2);
}

.form-group input.is-invalid {
    border-color: var(--error-color);
}

.error-text {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    text-align: left;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
}

.password-toggle:focus {
    outline: none;
}

/* Form Actions (Quên mật khẩu) */
.form-actions {
    width: 100%;
    max-width: 380px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.form-actions a {
    color: var(--primary-golden);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-actions a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-submit {
    width: 100%;
    max-width: 380px;
    padding: 15px 25px;
    background-color: var(--primary-golden);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-submit:hover {
    background-color: var(--light-golden);
    transform: translateY(-2px);
}

.btn-submit.btn-secondary {
    /* Dùng cho nút Hủy trong Đăng ký */
    background-color: #6c757d;
    /* Xám */
    margin-top: 15px;
}

.btn-submit.btn-secondary:hover {
    background-color: #5a6268;
}

.auth-switch-link,
.register-terms {
    margin-top: 30px;
    font-size: 0.95rem;
}

.auth-switch-link a,
.register-terms a {
    color: var(--primary-golden);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch-link a:hover,
.register-terms a:hover {
    text-decoration: underline;
}

/* Register specific */
.register-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Khoảng cách giữa Đăng ký và Hủy */
    width: 100%;
    max-width: 380px;
    margin-top: 20px;
}


/* Cột Ảnh */
.auth-image-column {
    flex: 1;
    background: linear-gradient(to bottom right, var(--primary-golden), var(--light-golden));
    /* Gradient vàng */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.auth-image-column img {
    max-width: 80%;
    height: auto;
    margin-bottom: 30px;
    animation: fadeInScale 1s ease-out;
    /* Hiệu ứng nhẹ khi load */
}

.auth-image-column h3 {
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.4;
    max-width: 400px;
    margin-bottom: 15px;
}

.auth-image-column p {
    font-size: 1.1rem;
    max-width: 400px;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .auth-container {
        flex-direction: column;
        width: 95%;
        margin: 20px auto;
    }

    .auth-image-column {
        padding: 30px;
        order: -1;
        /* Đặt ảnh lên trên form trên mobile */
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }

    .auth-form-column {
        padding: 40px 30px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
    }

    .auth-form-column h2 {
        font-size: 2rem;
    }

    .auth-image-column h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .auth-form-column {
        padding: 30px 20px;
    }

    .auth-form-column h2 {
        font-size: 1.8rem;
    }

    .social-login a {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .form-group input {
        padding: 12px 12px 12px 45px;
    }

    .form-group .input-icon {
        left: 15px;
    }

    .password-toggle {
        right: 12px;
    }

    .btn-submit {
        padding: 12px 20px;
        font-size: 1rem;
    }
}