/*
 * CSS for Popup Account Plugin
 * Version: 1.7.0
 */

/* =================================== */
/* Kiểu cho Nút Bấm Trigger          */
/* =================================== */

.popup-account-buttons-wrapper {
    display: inline-flex;
    gap: 15px; /* Khoảng cách giữa 2 nút */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    align-items: center; /* Căn chỉnh các nút theo chiều dọc */
}

.popup-account-buttons-wrapper a {
    padding: 10px 28px;
    border-radius: 50px; /* Bo góc tròn hoàn toàn */
    text-decoration: none;
    font-weight: 600; /* Chữ đậm hơn một chút */
    display: inline-block;
    border: 2px solid #000000;
    transition: opacity 0.3s ease;
    cursor: pointer;
    line-height: 1.5;
}

.popup-account-buttons-wrapper a:hover {
    opacity: 0.85; /* Hiệu ứng khi di chuột vào */
}

/* Kiểu cho nút "Đăng nhập" (Nền đen, chữ trắng) */
.button-popup-login {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}

/* Kiểu cho nút "Đăng ký" (Nền trắng, chữ đen) */
.button-popup-register {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

/* Thêm class để giảm kích thước chữ */
.pap-small-text {
    font-size: 0.75em !important; /* Giảm kích thước chữ đi một chút */
}


/* =================================== */
/* Kiểu cho Pop-up chung             */
/* =================================== */

.pap-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none; /* Ẩn mặc định */
    align-items: center;
    justify-content: center;
}

.pap-popup-overlay.is-visible {
    display: flex; /* Hiện ra khi có class is-visible */
}

.pap-popup-container {
    width: 476px;
    max-width: 90%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.pap-popup-overlay.is-visible .pap-popup-container {
    transform: translateY(0);
    opacity: 1;
}

.pap-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #e5e5e5;
}

#pap-popup-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pap-popup-close {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #888;
}

.pap-popup-close:hover {
    color: #000;
}

.pap-popup-body {
    padding: 25px;
}

/* ==================================================================== */
/* Kiểu cho Form                                                      */
/* ==================================================================== */

.pap-popup-body .woocommerce-form-login,
.pap-popup-body #pap-custom-register-form {
    width: 100%;
}

.pap-popup-body .woocommerce .u-columns.col2-set {
    display: block;
    width: 100%;
    margin: 0;
}

.pap-popup-body .woocommerce .u-column1,
.pap-popup-body .woocommerce .u-column2 {
    width: 100% !important;
    max-width: 100%;
    float: none !important;
    padding: 0 !important;
}

.pap-popup-body .form-row {
    margin-bottom: 15px;
}

.pap-popup-body .input-text {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    border-radius: 4px;
}

.pap-popup-body .button {
    width: 100%;
    padding: 12px;
    background-color: #585858 !important;
    color: #fff !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.pap-popup-body .button:hover {
    opacity: 0.85;
}

.pap-popup-body .woocommerce-form-login__rememberme {
    font-size: 14px;
    margin-bottom: 20px !important;
}

.pap-popup-body .woocommerce-LostPassword {
    font-size: 14px;
}

/* Ẩn tiêu đề phụ mặc định của WooCommerce */
.pap-popup-body .woocommerce-form-login h2 {
    display: none !important;
}

/* ========================================================== */
/* === MÃ MỚI: Style cho các nâng cấp form đăng ký        === */
/* ========================================================== */

/* Đặt Tên & Email trên cùng một dòng */
.pap-form-row-inline {
    display: flex;
    gap: 15px; /* Khoảng cách giữa hai trường */
    flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ */
}

.pap-form-row-inline .form-row {
    flex: 1; /* Chia đều không gian */
    min-width: 150px; /* Chiều rộng tối thiểu trước khi xuống dòng */
}

/* Style cho trường mật khẩu và biểu tượng mắt */
.pap-password-field {
    position: relative; /* Để định vị tuyệt đối biểu tượng */
}

.pap-password-toggle {
    position: absolute;
    right: 15px;
    bottom: 12px; /* Căn chỉnh dựa vào đáy của ô input (cao 44px) */
    cursor: pointer;
    user-select: none;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/%3E%3Circle cx="12" cy="12" r="3"/%3E%3C/svg%3E');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: opacity 0.2s ease-in-out;
}

.pap-password-toggle.show-password {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/%3E%3Cline x1="1" y1="1" x2="23" y2="23"/%3E%3C/svg%3E');
}

.pap-password-toggle:hover {
    opacity: 1;
}

/* === ĐÃ SỬA: Style cho nút đăng ký tùy chỉnh === */
#pap-custom-register-form .button {
    width: 200px !important; /* Tăng độ rộng */
    background-color: #cc0000 !important;
    border-color: #cc0000 !important;
    margin-top: 20px; /* Thêm khoảng cách 5px phía trên nút */
    float: left; /* Căn nút sang trái */
}