/* ==========================================================================
   Định dạng Form Đăng nhập Tùy chỉnh
   ========================================================================== */
:root {
    /* Màu sắc chung cho các form xác thực và có thể dùng chung */
    --primary-color: #0073aa;
    --secondary-color: #005177;
    --primary-text-color: #fff;

    /* Màu sắc cho thông báo */
    --success-bg: #d4edda;
    --success-text: #155724;
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --warning-bg: #fff3cd;
    --warning-text: #856404;
}

body.login {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh !important;
    background-color: #f1f1f1 !important;
    padding: 0 !important;
}

.my-login-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

.my-login-form-container .form-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 2em;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    box-sizing: border-box;
}

/* Hiển thị nhãn mặc định của WordPress */
.my-login-form-container label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5em;
}

/* Định dạng các trường nhập liệu */
.my-login-form-container input[type="text"],
.my-login-form-container input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 1em;
}

/* Định dạng checkbox "Giữ tôi luôn đăng nhập" */
.my-login-form-container .login-remember {
    display: flex;
    align-items: center;
    margin-bottom: 1.5em;
    font-size: 0.9em;
    color: #666;
}

.my-login-form-container .login-remember input[type="checkbox"] {
    margin-right: 5px;
}

/* Định dạng các nút Đăng nhập và Đăng ký */
.my-login-form-container .login-submit {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.my-login-form-container .login-submit input[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s;
}

.my-login-form-container .login-submit input[type="submit"]:hover {
    background-color: var(--secondary-color);
}

/* Định dạng nút Đăng ký riêng biệt */
.my-login-form-container .login-actions {
    margin-top: 10px;
}

.my-login-form-container .register-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    background-color: #eee;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.my-login-form-container .register-link:hover {
    background-color: #ddd;
}

/* Định dạng liên kết Quên mật khẩu */
.my-login-form-container .forgot-password {
    text-align: center;
    margin-top: 1.5em;
    font-size: 0.9em;
}

.my-login-form-container .forgot-password a {
    color: #999;
    text-decoration: none;
}

.my-login-form-container .forgot-password a:hover {
    color: #000;
    text-decoration: underline;
}

/* Định dạng khi đã đăng nhập */
.my-logged-in-container {
    text-align: center;
    padding: 2em;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: #fff;
    max-width: 400px;
    margin: 0 auto;
}

.my-logged-in-container p {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 1em;
}

.my-logged-in-container a.logout-button {
    padding: 10px 20px;
    background-color: #d9534f;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.my-logged-in-container a.logout-button:hover {
    background-color: #c9302c;
}

/* ==========================================================================
   Định dạng Form Quên Mật khẩu Tùy chỉnh
   ========================================================================== */
.my-forgot-password-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.my-forgot-password-container .form-title {
    text-align: center;
    color: #333;
    font-size: 1.5em;
    margin-bottom: 1em;
}

.my-forgot-password-container p {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

.my-forgot-password-container label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.my-forgot-password-container input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 1em;
}

.my-forgot-password-container input[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: 1em;
}

.my-forgot-password-container input[type="submit"]:hover {
    background-color: var(--secondary-color);
}

.my-forgot-password-container .back-to-login {
    text-align: center;
    margin-top: 1em;
}

.my-forgot-password-container .back-to-login a {
    color: #999;
    text-decoration: none;
}

.my-forgot-password-container .back-to-login a:hover {
    color: #000;
    text-decoration: underline;
}

.my-forgot-password-container .forgot-password-success {
    color: var(--success-text);
    background-color: var(--success-bg);
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 10px;
}

.my-forgot-password-container .forgot-password-error {
    color: var(--error-text);
    background-color: var(--error-bg);
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* ==========================================================================
   Định dạng Form Đăng ký Tùy chỉnh
   ========================================================================== */
.my-registration-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.my-registration-container .form-title {
    text-align: center;
    color: #333;
    font-size: 1.5em;
    margin-bottom: 1em;
}

.my-registration-container label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.my-registration-container input[type="text"],
.my-registration-container input[type="email"],
.my-registration-container input[type="password"],
.my-registration-container input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 1em;
}

.my-registration-container input[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: 1em;
}

.my-registration-container input[type="submit"]:hover {
    background-color: var(--secondary-color);
}

.my-registration-container .back-to-login {
    text-align: center;
    margin-top: 1em;
}

.my-registration-container .back-to-login a {
    color: #999;
    text-decoration: none;
}

.my-registration-container .back-to-login a:hover {
    color: #000;
    text-decoration: underline;
}

.my-registration-container .registration-error-messages {
    margin-bottom: 1em;
}

.my-registration-container .registration-error {
    color: var(--error-text);
    background-color: var(--error-bg);
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.my-registration-container .registration-success {
    color: var(--success-text);
    background-color: var(--success-bg);
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 0.5em;
}

/* Responsive adjustments for auth forms */
@media (max-width: 768px) {
    .my-login-form-container .form-wrapper,
    .my-forgot-password-container,
    .my-registration-container {
        max-width: 90%; /* Điều chỉnh cho màn hình nhỏ hơn */
        margin-left: auto;
        margin-right: auto;
    }
}
