/* ============================================================
   auth/auth.css — NUO For Life SG
   Login & Register Form — Auth feature styles
   ============================================================ */

/* ============================================================
   BASE — Font, Form reset (dùng chung .nuo-form)
   ============================================================ */
.woocommerce .nuo-form {
    font-family: 'Familjen Grotesk', sans-serif;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* Labels */
.woocommerce .nuo-form label {
    font-family: 'Familjen Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0.01em;
    color: #000000;
    display: block;
    margin-bottom: 4px;
    padding: 2px 0;
}

/* Inputs & Selects */
.woocommerce .nuo-form .form-row input[type="text"],
.woocommerce .nuo-form .form-row input[type="tel"],
.woocommerce .nuo-form .form-row input[type="email"],
.woocommerce .nuo-form .form-row input[type="password"],
.woocommerce .nuo-form .form-row input[type="date"],
.woocommerce .nuo-form .form-row select,
.woocommerce .nuo-form .form-row textarea {
    font-family: 'Familjen Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0.01em;
    color: #000000;
    background-color: #F2F2F2;
    border: 1px solid #A2A2A2;
    border-radius: 5px;
    padding: 14px 8px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

/* Placeholder */
.woocommerce .nuo-form .form-row input::placeholder,
.woocommerce .nuo-form .form-row textarea::placeholder {
    font-family: 'Familjen Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0.01em;
    color: #AAAAAA;
}

/* ============================================================
   .nuo-btn — Button dùng chung (LOGIN & REGISTER)
   Gọng ::before/::after + hover animation
   ============================================================ */
button.nuo-btn {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 58px !important;
    line-height: 1 !important;
    padding: 0 20px !important;
    margin: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    font-family: 'Familjen Grotesk', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    letter-spacing: 0.01em !important;
    text-transform: uppercase !important;
    text-align: center !important;
    pointer-events: auto !important;
    transition: color 0.35s ease !important;
}

/* Gọng trên */
button.nuo-btn::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 20px !important;
    color: inherit !important;
    border-top: 1px solid currentColor !important;
    border-left: 1px solid currentColor !important;
    border-right: 1px solid currentColor !important;
    border-bottom: none !important;
    border-radius: 10px 10px 0 0 !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
    transform: translateY(0) !important;
    transition: transform 0.3s ease !important;
}

/* Gọng dưới */
button.nuo-btn::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 20px !important;
    color: inherit !important;
    border-bottom: 1px solid currentColor !important;
    border-left: 1px solid currentColor !important;
    border-right: 1px solid currentColor !important;
    border-top: none !important;
    border-radius: 0 0 10px 10px !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
    transform: translateY(0) !important;
    transition: transform 0.3s ease !important;
}

/* Button row wrapper */
.form-row:has(button.nuo-btn) {
    position: relative !important;
    overflow: visible !important;
    height: 58px !important;
}

/* ============================================================
   REGISTER — Styles riêng
   ============================================================ */

/* Xóa border form */
.woocommerce form.register,
.woocommerce-account .u-column2,
.woocommerce-account #customer_login .u-column2 {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Layout: 2 cột First/Last name */
.woocommerce form.register .form-row-first {
    width: 48%;
    float: left;
    margin-right: 4%;
    clear: left;
}

.woocommerce form.register .form-row-last {
    width: 48%;
    float: right;
    margin-right: 0;
    clear: right;
}

.woocommerce form.register .form-row-wide {
    clear: both;
    width: 100%;
    float: none;
}

/* Custom Checkbox: Terms & Conditions */
.woocommerce form.register .nuo-checkbox-wrapper {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    cursor: pointer;
}

.woocommerce form.register .nuo-checkbox-wrapper span {
    font-family: 'Familjen Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2em;
    letter-spacing: 0.01em;
    color: #000000;
    display: inline-block !important;
    margin: 0 !important;
}

.woocommerce form.register .nuo-checkbox-wrapper input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 1.5px solid #CCCCCC;
    border-radius: 4px;
    background-color: #FFFFFF;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin: 0 !important;
}

.woocommerce form.register .nuo-checkbox-wrapper input[type="checkbox"]:hover {
    border-color: #888888;
}

.woocommerce form.register .nuo-checkbox-wrapper input[type="checkbox"]:checked {
    border-color: transparent;
    background-color: transparent;
    background-image: url('https://nuoforlifesg.opsgreat.ws/wp-content/uploads/2026/06/container.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}

.woocommerce form.register .nuo-checkbox-wrapper a {
    font-family: 'Familjen Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2em;
    letter-spacing: 0.01em;
    color: #369E84;
    text-decoration: underline;
    text-decoration-skip-ink: auto;
}

.woocommerce form.register .nuo-checkbox-wrapper a:hover {
    text-decoration: none;
}

/* Register button: mặc định mờ, cần check checkbox */
button.nuo-register-btn {
    color: #AAAAAA !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

button.nuo-register-btn.nuo-btn-active {
    color: #000000 !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

button.nuo-register-btn.nuo-btn-active:hover::before {
    transform: translateY(10px) !important;
}

button.nuo-register-btn.nuo-btn-active:hover::after {
    transform: translateY(-10px) !important;
}

.form-row:has(button.nuo-register-btn) {
    margin: 20px 0 0 0 !important;
}

/* Date of Birth — custom calendar icon */
.woocommerce form.register .nuo-field-date .woocommerce-input-wrapper {
    position: relative;
    display: block;
}

.woocommerce form.register .nuo-field-date input[type="date"] {
    padding-right: 40px;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
}

.woocommerce form.register .nuo-field-date input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 32px;
    height: 32px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 2;
}

.woocommerce form.register .nuo-field-date .woocommerce-input-wrapper::after {
    content: '';
    display: block;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url('https://nuoforlifesg.opsgreat.ws/wp-content/uploads/2026/07/calendar.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    z-index: 1;
}

/* Select — custom arrow down */
.woocommerce form.register .form-row select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('https://nuoforlifesg.opsgreat.ws/wp-content/uploads/2026/07/arrow-down.svg') !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 24px !important;
    padding-right: 44px !important;
}

.woocommerce form .select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none !important;
}

.woocommerce form .select2-container--default .select2-selection--single .select2-selection__arrow {
    background-image: url('https://nuoforlifesg.opsgreat.ws/wp-content/uploads/2026/07/arrow-down.svg') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 24px !important;
    width: 24px !important;
    height: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 12px !important;
}

/* Ẩn "Your personal data..." */
.woocommerce-privacy-policy-text {
    display: none !important;
}

/* Responsive mobile */
@media (max-width: 767px) {
    .woocommerce form.register .nuo-checkbox-wrapper {
        align-items: flex-start !important;
    }

    .woocommerce form.register .nuo-checkbox-wrapper input[type="checkbox"] {
        margin-top: 2px !important;
    }

    .woocommerce form.register .nuo-checkbox-wrapper a {
        display: block !important;
        margin-left: -32px !important; /* 20px (checkbox) + 12px (gap) */
        margin-top: 6px !important;
    }
}

/* ============================================================
   LOGIN — Styles riêng
   ============================================================ */

/* Gap 30px giữa các phần tử */
.woocommerce .nuo-form.login .form-row,
.woocommerce .nuo-form.login .woocommerce-LostPassword,
.woocommerce .nuo-form.login .nuo-login-btn-row,
.woocommerce .nuo-form.login .nuo-divider-wrapper,
.woocommerce .nuo-form.login .nuo-social-login {
    margin-top: 30px !important;
    margin-bottom: 0 !important;
}

.woocommerce .nuo-form.login .form-row:first-of-type {
    margin-top: 0 !important;
}

/* Forgot password */
.woocommerce .nuo-form .woocommerce-LostPassword {
    padding: 0;
}

.woocommerce .nuo-form .woocommerce-LostPassword a {
    font-family: 'Familjen Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.woocommerce .nuo-form .woocommerce-LostPassword a:hover {
    color: #333333;
}

/* Login button row */
.nuo-login-btn-row {
    margin: 0 !important;
}

/* Login button: luôn active */
button.nuo-login-btn {
    color: #000000 !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

button.nuo-login-btn:hover::before {
    transform: translateY(10px) !important;
}

button.nuo-login-btn:hover::after {
    transform: translateY(-10px) !important;
}

/* Divider: 1px dashed */
.nuo-divider-wrapper {
    padding: 8px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

hr.nuo-divider {
    border: none !important;
    border-top: 1px dashed #A2A2A2 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 0 !important;
    box-sizing: border-box !important;
}

/* Social login buttons */
.nuo-social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px !important;
}

.nuo-social-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 48px !important;
    box-sizing: border-box !important;
    background-color: #F2F2F2 !important;
    border: 1px solid #A2A2A2 !important;
    border-radius: 10px !important;
    font-family: 'Familjen Grotesk', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    letter-spacing: 0.01em !important;
    text-transform: uppercase !important;
    color: #000000 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
}

.nuo-social-btn:hover {
    background-color: #E8E8E8 !important;
    border-color: #888888 !important;
    color: #000000 !important;
    text-decoration: none !important;
}
