/**
 * CSS cho trang đăng ký và đăng nhập
 * Flatsome Child Theme - Theo thiết kế Comem.vn
 */

/* Import font Be Vietnam Pro */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&display=swap');

/* Reset Flatsome CSS */
.topbest-auth-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Căn giữa content area */
#content.content-area {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 0;
}

#content.content-area > .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

#content.content-area .row {
    display: flex;
    justify-content: center;
    margin: 0;
}

#content.content-area .row > [class*="col-"] {
    float: none;
    margin: 0 auto;
}

/* Container chính */
.topbest-auth-wrapper {
    background: #fff;
    padding: 50px 40px;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tiêu đề */
.topbest-auth-title {
    text-align: center;
    margin-bottom: 35px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

/* Form styles */
.topbest-register-form,
.topbest-login-form {
    max-width: 100%;
    font-family: 'Be Vietnam Pro', sans-serif;
}

/* Password toggle icon */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .password-input {
    background: #fff;
    border: 1px solid rgba(115, 129, 54, 0.2);
    border-radius: 5px;
    box-sizing: border-box;
    height: 56px;
    padding-left: 20px;
    padding-right: 50px !important;
    transition: all 0.3s;
    width: 100%;
    font-size: 14px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.password-input-wrapper .password-input:focus {
    outline: none;
    border-color: #8d2556;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(141, 37, 86, 0.1);
}

.password-input-wrapper .password-input::placeholder {
    color: #999;
    font-size: 14px;
}

.password-toggle-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.password-toggle-icon:hover {
    color: #8d2556;
}

.password-toggle-icon i {
    font-size: 18px;
}

/* Row cho 2 nút - dùng Flatsome row/col */
.topbest-register-form .row,
.topbest-login-form .row {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.topbest-register-form .row .col,
.topbest-login-form .row .col {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Link "Về trang đăng nhập" */
.auth-link {
    color: #8d2556;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.auth-link:hover {
    color: #6f1d45;
    text-decoration: underline;
}

@media (max-width: 767px) {
    .topbest-register-form .row,
    .topbest-login-form .row {
        flex-direction: column-reverse;
    }

    .topbest-register-form .row .col,
    .topbest-login-form .row .col {
        width: 100%;
        margin-bottom: 15px;
    }

    .topbest-register-form .row .col:first-child,
    .topbest-login-form .row .col:first-child {
        margin-bottom: 0;
    }
}

/* Button - Override Flatsome button */
.topbest-register-form .button.primary,
.topbest-login-form .button.primary,
.form-row button[type="submit"] {
    background-color: #8d2556 !important;
    border-color: #8d2556 !important;
    color: #fff !important;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 16px;
    font-weight: 700;
    height: 45px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 5px;
    transition: all 0.3s;
}

.topbest-register-form .button.primary:hover,
.topbest-login-form .button.primary:hover,
.form-row button[type="submit"]:hover {
    background-color: #6f1d45 !important;
    border-color: #6f1d45 !important;
    color: #fff !important;
}

/* Thông báo */
.topbest-error,
.topbest-success,
.topbest-info {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    font-size: 14px;
}

.topbest-error,
.woocommerce-error {
    background-color: #fee;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

.topbest-success,
.woocommerce-message {
    background-color: #efffef;
    border-left: 4px solid #27ae60;
    color: #229954;
}

.topbest-info,
.woocommerce-info {
    background-color: #e8f4fd;
    border-left: 4px solid #3498db;
    color: #2980b9;
}

/* Links - for login page */
.topbest-auth-links {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.topbest-auth-links a {
    color: #8d2556;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.topbest-auth-links a:hover {
    color: #6f1d45;
    text-decoration: underline;
}

/* Form styles - for login page */
.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.form-row .input-text {
    background: #fff;
    border: 1px solid rgba(115, 129, 54, 0.2);
    border-radius: 5px;
    box-sizing: border-box;
    height: 56px;
    padding-left: 20px;
    padding-right: 20px;
    transition: all 0.3s;
    width: 100%;
    font-size: 14px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.form-row .input-text:focus {
    outline: none;
    border-color: #8d2556;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(141, 37, 86, 0.1);
}

.form-row .input-text::placeholder {
    color: #999;
    font-size: 14px;
}

/* Password input trong form-row */
.form-row .password-input-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.form-row .password-input-wrapper .password-input {
    background: #fff;
    border: 1px solid rgba(115, 129, 54, 0.2);
    border-radius: 5px;
    box-sizing: border-box;
    height: 56px;
    padding-left: 20px;
    padding-right: 50px !important;
    transition: all 0.3s;
    width: 100%;
    font-size: 14px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.form-row .password-input-wrapper .password-input:focus {
    outline: none;
    border-color: #8d2556;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(141, 37, 86, 0.1);
}

.form-row .password-input-wrapper .password-input::placeholder {
    color: #999;
    font-size: 14px;
}

.form-row .password-input-wrapper .password-toggle-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Form remember me row */
.form-row-remember {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    margin-top: 20px;
}

.form-row-remember label.inline {
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    font-size: 14px;
    flex: 1;
    min-width: 200px;
    margin: 0;
}

.form-row-remember label.inline input[type="checkbox"] {
    margin-right: 10px;
    margin-bottom: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-row-remember .lost-password-link {
    color: #8d2556;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-row-remember .lost-password-link:hover {
    color: #6f1d45;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .topbest-auth-wrapper {
        padding: 35px 25px;
        margin: 30px 0;
    }

    .topbest-auth-title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .form-row-remember {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .form-row-remember label.inline {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .topbest-auth-wrapper {
        padding: 30px 20px;
        margin: 20px 0;
    }

    .topbest-auth-title {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .topbest-auth-links {
        font-size: 13px;
    }

    .form__row {
        margin-bottom: 15px;
    }
}

/* Animation cho form load */
.topbest-auth-wrapper {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
