/* ========== LOGIN TRIGGER BUTTON ========== */
.custom-login-trigger {
    cursor: pointer;
    text-decoration: none;
    padding: 10px 20px;
    background: #0071a1;
    color: #fff;
    border-radius: 4px;
    display: inline-block;
    transition: background 0.3s ease;
}

.custom-login-trigger:hover {
    background: #005177;
    color: #fff;
}

/* ========== POPUP MODAL ========== */
.custom-login-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.custom-login-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.custom-login-popup-content {
    position: relative;
    max-width: 500px;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
}

.custom-login-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
}

.custom-login-popup-close:hover {
    color: #000 !important;
    background-color: transparent !important;
}

.custom-login-popup h2 {
    margin: 0 0 15px;
    font-size: 28px;
    color: #707070;
    text-align: center;
    border-bottom: 1px solid #4F4F4F4D;
    padding-bottom: 15px;
}

/* ========== LOGIN TABS (Popup & My Account) ========== */
.login-tabs,
.woocommerce-login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e5e5e5;
}

.login-tab,
.woocommerce-login-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.login-tab:hover,
.woocommerce-login-tab:hover {
    color: #707070;
}
.login-tab:hover,
.login-tab.active,
.woocommerce-login-tab.active {
    color: #707070;
    border-bottom-color: #707070;
}

/* ========== FORM CONTAINERS ========== */
.login-form-container,
.woocommerce-login-container {
    display: none;
}

.login-form-container.active,
.woocommerce-login-container.active {
    display: block;
}

.woocommerce-login-container {
    padding: 20px 0;
}

/* ========== FORM STYLES ========== */
.custom-login-popup .form-row {
    margin-bottom: 20px;
        gap: 10px;
    display: flex;
    flex-wrap: wrap;
}

.custom-login-popup label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.custom-login-popup .required {
    color: #e74c3c;
}

.custom-login-popup .input-text {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #4F4F4F4D;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.custom-login-popup .input-text:focus {
    outline: none;
    border-color: #0071a1;
}

.custom-login-popup .button {
    padding: 12px 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
    
    background:#707070;
    border: 1px solid #707070;
    border-radius: 10px;
    box-shadow: 4px 4px 5px 0px #0000001C;
    color: #fff;
    font-family: "Urbanist";
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
}

.custom-login-popup .button:hover {
    background: #fff;
    color: #707070;
    border: 1px solid #fff;
}

.custom-login-popup .button-secondary,
.woocommerce-passcode-login .button-secondary {
    background: #707070;
}

.custom-login-popup .button-secondary:hover,
.woocommerce-passcode-login .button-secondary:hover {
    background: #fff;
    color: #707070;
}

.custom-login-popup .woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.custom-login-popup .woocommerce-form__input-checkbox {
    width: auto;
    margin-right: 8px;
}

.custom-login-popup .lost_password {
    margin-top: 15px;
}

.custom-login-popup .lost_password a {
    color: #707070;
    text-decoration: none;
    font-size: 14px;
}

.custom-login-popup .lost_password a:hover {
    text-decoration: underline;
}

/* ========== PASSCODE MESSAGES ========== */
.passcode-message,
.passcode-verify-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.passcode-message.success,
.passcode-verify-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.passcode-message.error,
.passcode-verify-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ========== LOGIN ERROR MESSAGES ========== */
.login-error-message {
    margin-bottom: 20px;
    padding: 12px 15px 12px 45px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.login-error-message::before {
    content: "⚠";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #721c24;
}

.login-error-message a {
    color: #721c24;
    text-decoration: underline;
}

.login-error-message a:hover {
    color: #491217;
}

/* WooCommerce error styling compatibility */
.woocommerce-error {
    list-style: none;
    padding: 12px 15px 12px 45px;
    margin-bottom: 20px;
    position: relative;
}

.woocommerce-error::before {
    content: "⚠";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #721c24;
}

/* ========== LOADING STATE ========== */
.button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
    .custom-login-popup .button {
        padding: 8px 22px;
    }
    .custom-login-popup-content {
        padding: 30px 20px;
        max-width: calc(100% - 40px);
    }
    
    .login-tab,
    .woocommerce-login-tab {
        font-size: 12px;
        padding: 10px;
    }
    
    .custom-login-popup h2 {
        font-size: 24px;
    }
}


/* ========== MY ACCOUNT PAGE LAYOUT FIX ========== */
/* When registration is disabled, make login form full width */
#customer_login .u-column1:only-child {
    width: 100%;
    /* max-width: 600px; */
    margin: 0 auto;
}

/* Ensure proper spacing when both columns exist */
#customer_login .u-column1,
#customer_login .u-column2 {
    box-sizing: border-box;
}
