/* Authentication Popup Container */
.login-register-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.login-register-popup.active {
    opacity: 1;
    visibility: visible;
}
.login-register-popup .popup_content_login {
    background: #fff;
    padding: 40px 10px 10px;
    border-radius: 10px;
    max-width: 400px!important;
    width: 100%!important;
    margin: 0!important;
    transition: transform 0.3s ease;
}
.login-register-popup .close-popup {
    position: absolute;
    top: 2.5px;
    right: 10px;
    font-size: 30px;
    cursor: pointer;
    color: #000;
    transition: color 0.3s ease;
    border: none;
    background: none;
}
.login-register-popup .close-popup:hover {
    color: #000;
}

/* Tab Navigation */
.login-register-popup .tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: none!important;
}
.login-register-popup .tab-link {
    min-width: calc(50% - 5px)!important;
    margin: 0!important;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #000;
    transition: all 0.3s ease;
    border: 1px solid #000;
}
.login-register-popup .tab-link.active {
    color: #fff;
    border-color: #000!important;
    background-color: #000!important;
}
.login-register-popup .tab-link:hover {
    color: #fff;
    background-color: #000!important;
}
.login-register-popup .tab-link.active:hover {
    background-color: transparent!important;
    color: #000!important;
    border: 1px solid #000!important;
}

/* Tab Content */
.login-register-popup .tab-content { display: none; }
.login-register-popup .tab-content.active { display: block; }

/* Forms */
.login-register-popup .custom-login-form,
.login-register-popup .custom-register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}
.login-register-popup .custom-login-form-label,
.login-register-popup .custom-register-form-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: 500;
    color: #000;
    font-size: 16px;
}
.login-register-popup .custom-login-form-input,
.login-register-popup .custom-register-form-input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}
.login-register-popup .custom-login-form-input:focus,
.login-register-popup .custom-register-form-input:focus {
    outline: 1px solid rgba(0, 0, 0, .5);
    border-color: #000;
}
.login-register-popup .custom-login-form-checkbox { margin-right: 8px; }
.login-register-popup .checkbox-label {
    flex-direction: row !important;
    align-items: center;
    font-weight: normal;
}

/* Submit Buttons */
.login-register-popup .custom-login-form-submit,
.login-register-popup .custom-register-form-submit {
    cursor: pointer;
    margin: 10px auto 0!important;
    border: 1px solid #000;
    font-weight: 500;
    text-transform: none;
    padding: 10px 20px;
    font-size: 16px;
    min-width: 160px;
    border-radius: 5px;
    background-color: #000;
    color: #fff;
    transition: background-color 0.3s ease;
}
.login-register-popup .custom-login-form-submit:hover,
.login-register-popup .custom-register-form-submit:hover {
    background: transparent;
    color: #000;
}
.login-register-popup .custom-login-form-submit:disabled,
.login-register-popup .custom-register-form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

/* Forgot Password Link */
.login-register-popup .forgot-password-link {
    text-align: center;
    margin-top: 0;
}
.login-register-popup .forgot-password-link a {
    color: #000;
    text-decoration: none;
    font-size: 11px;
    transition: all 0.3s ease;
}
.login-register-popup .forgot-password-link a:hover {
    color: #666;
    text-decoration: none;
}

/* Error & Success Messages */
.login-register-popup .login-error-message,
.login-register-popup .register-error-message {
    max-width: 100%;
    width: 100%;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: none;
    font-weight: 500;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: left;
}
.login-register-popup .login-error-message.show,
.login-register-popup .register-error-message.show {
    display: block;
    animation: ceit_scr_slideInDown 0.3s ease;
}
.login-register-popup .login-error-message.error,
.login-register-popup .register-error-message.error {
    background: #ffebee;
    color: #c62828;
    border-left-color: #c62828;
}
.login-register-popup .login-error-message.success,
.login-register-popup .register-error-message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left-color: #2e7d32;
}
.login-register-popup .message-icon {
    margin-right: 8px;
    font-size: 16px;
    display: inline-block;
    vertical-align: middle;
}
.login-register-popup .message-text {
    display: inline-block;
    vertical-align: middle;
    text-align: left;
    font-size: 12px;
    flex: 1;
}

/* Animations */
@keyframes ceit_scr_slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes ceit_scr_copySuccess {
    0% { background-color: #f0f8ff; transform: scale(1); }
    50% { background-color: #c8e6c9; transform: scale(1.1); }
    100% { background-color: #f0f8ff; transform: scale(1); }
}
@keyframes ceit_scr_copyError {
    0% { background-color: #f0f8ff; transform: scale(1); }
    50% { background-color: #ffcdd2; transform: scale(1.1); }
    100% { background-color: #f0f8ff; transform: scale(1); }
}
.login-register-popup .copy-success { animation: ceit_scr_copySuccess 0.6s ease; }
.login-register-popup .copy-error { animation: ceit_scr_copyError 0.6s ease; }

/* Phone Input Mask */
.login-register-popup .phone-mask {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Loading Spinner */
.login-register-popup .loading-spinner {
    display: inline-block !important;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: ceit_scr_spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 10 !important;
}
.login-register-popup .custom-login-form-submit .loading-spinner,
.login-register-popup .custom-register-form-submit .loading-spinner {
    border-top-color: #fff !important;
    background: transparent !important;
}
@keyframes ceit_scr_spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading State for Forms */
.login-register-popup .custom-login-form.loading .custom-login-form-input,
.login-register-popup .custom-register-form.loading .custom-register-form-input,
.login-register-popup .custom-login-form.loading .custom-login-form-checkbox,
.login-register-popup .custom-register-form.loading .custom-register-form-input {
    opacity: 0.5;
    pointer-events: none;
}
.login-register-popup .custom-login-form.loading *,
.login-register-popup .custom-register-form.loading * {
    opacity: 0.5;
    pointer-events: none;
}
.login-register-popup .custom-login-form.loading .custom-login-form-submit,
.login-register-popup .custom-register-form.loading .custom-register-form-submit {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Form Overlay Loader */
.ceitscr-form-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: saturate(120%) blur(2px);
    border-radius: 8px;
    z-index: 20;
    align-items: center;
    justify-content: center;
}
.custom-login-form.loading .ceitscr-form-overlay,
.custom-register-form.loading .ceitscr-form-overlay {
    display: flex;
}
.ceitscr-form-overlay .loading-spinner {
    width: 28px;
    height: 28px;
    border-width: 3px;
    border-top-color: #000;
}

/* Responsive Styles */
@media (max-width: 480px) {
    .login-register-popup .popup_content_login {
        max-width: calc(100% - 30px)!important;
    }
    .login-register-popup .tab-link {
        text-align: center;
    }
}

/* Shortcode Form Styles */
.ceitscr-auth-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.ceitscr-auth-form .tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: none;
}
.ceitscr-auth-form .tab-link {
    min-width: calc(50% - 5px);
    margin: 0;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #000;
    transition: all 0.3s ease;
    border: 1px solid #000;
}
.ceitscr-auth-form .tab-link.active {
    color: #fff;
    border-color: #000;
    background-color: #000;
}
.ceitscr-auth-form .tab-link:hover {
    color: #fff;
    background-color: #000;
}
.ceitscr-auth-form .tab-link.active:hover {
    background-color: transparent;
    color: #000;
    border: 1px solid #000;
}
.ceitscr-auth-form .tab-content { display: none; }
.ceitscr-auth-form .tab-content.active { display: block; }
.ceitscr-auth-form .custom-login-form,
.ceitscr-auth-form .custom-register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}
.ceitscr-auth-form .custom-login-form-label,
.ceitscr-auth-form .custom-register-form-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: 500;
    color: #000;
    font-size: 16px;
}
.ceitscr-auth-form .custom-login-form-input,
.ceitscr-auth-form .custom-register-form-input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}
.ceitscr-auth-form .custom-login-form-input:focus,
.ceitscr-auth-form .custom-register-form-input:focus {
    outline: 1px solid rgba(0, 0, 0, .5);
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}
.ceitscr-auth-form .custom-login-form-checkbox { margin-right: 8px; }
.ceitscr-auth-form .checkbox-label {
    display: flex;
    flex-flow: row!important;
    align-items: center;
    font-weight: normal;
}
.ceitscr-auth-form .custom-login-form-submit,
.ceitscr-auth-form .custom-register-form-submit {
    padding: 12px 20px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #000;
    transition: background-color 0.3s ease;
}
.ceitscr-auth-form .custom-login-form-submit:hover,
.ceitscr-auth-form .custom-register-form-submit:hover {
    background: transparent;
    color: #000;
}
.ceitscr-auth-form .forgot-password-link {
    text-align: center;
    margin-top: 10px;
}
.ceitscr-auth-form .forgot-password-link a {
    color: #000;
    text-decoration: none;
    font-size: 14px;
}
.ceitscr-auth-form .forgot-password-link a:hover {
    text-decoration: underline;
}
.ceitscr-auth-form .login-error-message,
.ceitscr-auth-form .register-error-message {
    max-width: 100%;
    width: 100%;
    display: none;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
    border-left: 4px solid;
}
.ceitscr-auth-form .login-error-message.show,
.ceitscr-auth-form .register-error-message.show {
    display: block;
    animation: ceit_scr_slideInDown 0.3s ease;
}
.ceitscr-auth-form .login-error-message.error,
.ceitscr-auth-form .register-error-message.error {
    background: #ffebee;
    color: #c62828;
    border-left-color: #c62828;
}
.ceitscr-auth-form .login-error-message.success,
.ceitscr-auth-form .register-error-message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left-color: #2e7d32;
}
.ceitscr-auth-form .message-text {
    display: block;
    text-align: left;
    font-size: 12px;
    line-height: 1.4;
}
@media (max-width: 480px) {
    .ceitscr-auth-form {
        padding: 15px;
        margin: 10px;
    }
    .ceitscr-auth-form .tab-link {
        font-size: 14px;
        padding: 8px;
    }
    .ceitscr-auth-form .custom-login-form-input,
    .ceitscr-auth-form .custom-register-form-input {
        padding: 10px 12px;
        font-size: 16px;
    }
}

/* Inline Field Validation */
.email-validate-msg,
.phone-validate {
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 100%;
    width: 100%;
    text-align: left;
    color: #dc3545;
    font-size: 10px;
    line-height: 1.2;
    margin-top: 7px;
}

.ceitscr-auth-form .custom-login-form .email-validate-msg, 
.ceitscr-auth-form .custom-register-form .email-validate-msg,
.ceitscr-auth-form .custom-login-form .phone-validate, 
.ceitscr-auth-form .custom-register-form .phone-validate,
.login-register-popup .custom-login-form .email-validate-msg, 
.login-register-popup .custom-register-form .email-validate-msg,
.login-register-popup .custom-login-form .phone-validate, 
.login-register-popup .custom-register-form .phone-validate {
    margin-top: -8px;
}
.email-validate-input.complete-email,
.phone-mask.complete-phone {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 1px #28a745 !important;
}
.email-validate-input.incomplete-email,
.phone-mask.incomplete-phone {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px #dc3545 !important;
}

/* WooCommerce Checkout Styles */
body.woocommerce-checkout .woocommerce-additional-fields {
    display: flex;
    flex-flow: column;
}

body.woocommerce-checkout #ceit_scr_register_password_field {
    margin-top: 10px;
}

body.woocommerce-checkout #instagram_handle_field { order: -1; }
body.woocommerce-checkout #ceit_scr_register_me_field .checkbox span { display: block; font-size: 9px!important; }
body.woocommerce-checkout #ceit_scr_register_me_field label,
body.woocommerce-checkout #ceit_scr_register_password_field label,
body.woocommerce-checkout #ceit_scr_register_password_confirm_field label {
    font-size: 12px;
    line-height: 1.2;
}

body.woocommerce-checkout #ceit_scr_register_me_field label {
    display: inline-block;
    padding-left: 24px;
}

body.woocommerce-checkout #ceit_scr_register_me_field .input-checkbox {
    margin-left: -24px;
}

body.woocommerce-checkout #ceit_scr_register_me_field span {
    padding-left: 0!important;
}

body.woocommerce-checkout #ceit_scr_register_me_field .optional,
body.woocommerce-checkout #ceit_scr_register_password_field .optional,
body.woocommerce-checkout #ceit_scr_register_password_confirm_field .optional {
    display: none;
}
.ceit_scr_hidden_field {
    display: none;
    transition: all 0.3s ease;
}
body.woocommerce-checkout .required {
    color: #dc3232;
    font-weight: bold;
}
body.woocommerce-checkout .woocommerce-invalid .input-text {
    border-color: #dc3232 !important;
}
body.woocommerce-checkout .optional {
    transition: opacity 0.3s ease;
}
body.woocommerce-checkout .ceit_scr_hidden_field {
    transition: all 0.3s ease;
}
body.woocommerce-checkout #ceit_scr_register_password_field,
body.woocommerce-checkout #ceit_scr_register_password_confirm_field {
    display: none;
}
body.woocommerce-checkout.logged-in #ceit_scr_register_me_field,
body.woocommerce-checkout #ceit_scr_register_me_field .checkbox .optional, 
body.woocommerce-checkout.logged-in #ceit_scr_register_password_field,
body.woocommerce-checkout.logged-in #ceit_scr_register_password_confirm_field {
    display: none !important;
}
body.woocommerce-checkout .woocommerce-invalid-required-field label {
    color: #dc3232;
}
body.woocommerce-checkout #ceit_scr_register_password_field,
body.woocommerce-checkout #ceit_scr_register_password_confirm_field {
    transition: all 0.3s ease;
}
body.woocommerce-checkout .loading-spinner {
    display: inline-block !important;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: ceit_scr_spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
    opacity: 1 !important;
    visibility: visible !important;
}
body.woocommerce-checkout #place_order:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
body.woocommerce-checkout .woocommerce-error {
    border-left-color: #dc3545;
    background-color: #f8d7da;
    color: #721c24;
}
body.woocommerce-checkout .woocommerce-error li {
    color: #721c24;
    font-weight: 500;
}
body.woocommerce-checkout .woocommerce-invalid .input-text {
    border-color: #dc3545;
    box-shadow: 0 0 0 1px #dc3545;
}
body.woocommerce-checkout .woocommerce-invalid-required-field label {
    color: #dc3545;
    font-weight: 600;
}
body.woocommerce-checkout .woocommerce-validated .input-text {
    border-color: #28a745;
    box-shadow: 0 0 0 1px #28a745;
}

/* Phone Validation Styles (Checkout) */
.phone-mask.incomplete-phone {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px #dc3545 !important;
}
.phone-mask.complete-phone {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 1px #28a745 !important;
}

/* WooCommerce Error Styles */
.woocommerce-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.woocommerce-error ul {
    margin: 0;
    padding-left: 20px;
}
.woocommerce-error li {
    margin-bottom: 5px;
}
#billing_phone_field.woocommerce-invalid .phone-mask {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px #dc3545 !important;
}
#billing_email_field.woocommerce-invalid .input-text {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px #dc3545 !important;
}

/* Mobile Menu Login Links */
.mobile_menu_block_center_sextion .login-links {
    margin-bottom: 30px;
    font-size: 15px;
    font-weight: 600;
}
