/* ========================================
   NATURE-INSPIRED PREMIUM LOGIN PAGE
   Organic botanical design with glassmorphism
   ======================================== */

/* Hide default page elements - ONLY on login/register page */
body.woocommerce-account:not(.logged-in):has(.custom-login-wrapper) .page-title,
body.woocommerce-account:not(.logged-in):has(.custom-login-wrapper) .entry-header,
body.woocommerce-account:not(.logged-in):has(.custom-login-wrapper) .page-header {
    display: none !important;
}

/* Clean neutral background ONLY for login page - REMOVED to show global background */
/* body.woocommerce-account:not(.logged-in):has(.custom-login-wrapper) {
    background: transparent !important;
} */

/* Center the login form - ONLY on login/register page */
body.woocommerce-account:not(.logged-in):has(.custom-login-wrapper) .woocommerce {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 100px;
    position: relative;
    z-index: 1;
}

/* MAIN CONTAINER - Elegant Glass Card with Botanical Background */
/* MAIN CONTAINER - Elegant Glass Card Blending with Global Background */
.custom-login-wrapper {
    max-width: 480px !important;
    width: 100% !important;
    margin: 0 auto !important;
    background: rgba(255, 255, 255, 0.65) !important;
    /* Reduced opacity for better blending */
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    padding: 0 !important;
    border-radius: 24px !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.4),
        0 12px 40px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

/* Glassmorphism overlay removed as the wrapper itself acts as the glass layer */
.custom-login-wrapper::before {
    display: none !important;
}

.custom-login-wrapper:hover {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.6),
        0 16px 50px rgba(0, 0, 0, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.06) !important;
}

/* Inner container with proper padding */
.custom-login-container {
    max-width: 100% !important;
    padding: 48px 40px 40px !important;
    background: transparent !important;
    position: relative !important;
    z-index: 1 !important;
}

/* LOGO / BRAND ICON */
.login-logo {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center;
    margin-bottom: 24px;
    width: 100% !important;
}

.login-logo img,
.login-logo svg,
.login-logo .custom-logo-link img {
    height: 64px !important;
    /* Increased size for better visibility */
    width: auto !important;
    max-width: 100% !important;
    display: block !important;
    margin: 0 auto !important;
    /* Force margin auto as backup */
}

/* Target the WordPress generated link specifically */
.login-logo .custom-logo-link {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.login-logo a {
    text-decoration: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    line-height: 0 !important;
}

.login-logo .logo {
    font-family: 'Outfit', sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #5E7045 !important;
}

/* TITLE - Welcome Back */
.custom-login-container h2 {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #5E7045 !important;
    text-align: center !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.5px !important;
    line-height: 1.2 !important;
}

/* Subtitle */
.login-subtitle {
    font-family: 'Outfit', sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: rgba(0, 0, 0, 0.55) !important;
    text-align: center !important;
    margin: 0 0 28px 0 !important;
}

/* GOOGLE BUTTON - Top Position, Official Style */
.google-login-container {
    margin-bottom: 20px;
}

.google-login-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 12px 20px !important;
    background: white !important;
    color: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.google-login-button:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px) !important;
}

.google-login-button svg {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
}

/* SEPARATOR - Minimal "or" */
.social-login-separator {
    position: relative !important;
    text-align: center !important;
    margin: 24px 0 !important;
}

.social-login-separator::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1), transparent) !important;
}

.social-login-separator span {
    position: relative !important;
    background: rgba(255, 255, 255, 0.8) !important;
    padding: 0 16px !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: rgba(0, 0, 0, 0.45) !important;
    text-transform: lowercase !important;
    backdrop-filter: blur(5px) !important;
    border-radius: 10px !important;
}

/* FORM ELEMENTS */
.woocommerce-form-row {
    margin-bottom: 20px !important;
}

/* INPUT FIELDS WITH ICONS */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

/* ROBUSTLY HIDE EXTRA ICONS INJECTED BY PLUGINS */
/* ROBUSTLY HIDE EXTRA ICONS INJECTED BY PLUGINS BUT ALLOW WOOCOMMERCE WRAPPER */
.input-with-icon>*:not(input):not(.input-icon):not(.password-toggle):not(.password-input) {
    display: none !important;
}

/* Ensure WooCommerce password wrapper behaves correctly in flex layout */
.password-input {
    flex: 1 !important;
    width: 100% !important;
    display: block !important;
    position: relative !important;
}

/* Hide WooCommerce's default password toggle since we use our own */
.show-password-input {
    display: none !important;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 2;
}

.input-with-icon .woocommerce-Input {
    width: 100% !important;
    padding: 14px 44px 14px 48px !important;
    /* Increased padding for larger icons */
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #2F5D50 !important;
    background: rgba(255, 255, 255, 0.5) !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.input-with-icon .woocommerce-Input::placeholder {
    color: rgba(0, 0, 0, 0.35) !important;
    font-weight: 400 !important;
}

.input-with-icon .woocommerce-Input:hover {
    border-color: rgba(122, 155, 142, 0.3) !important;
    background: rgba(255, 255, 255, 0.7) !important;
}

.input-with-icon .woocommerce-Input:focus {
    border-color: #5E7045 !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(94, 112, 69, 0.15) !important;
}

/* PASSWORD TOGGLE BUTTON - CUSTOM */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    /* High z-index to ensure clickability */
    transition: opacity 0.2s;
    border-radius: 50%;
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.password-toggle .eye-icon {
    width: 20px;
    height: 20px;
}

/* CHECKBOX - Minimal Style - FORCE LEFT ALIGNMENT */
body.woocommerce-account .woocommerce form .form-row:has(#rememberme),
.login-remember-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 24px !important;
    padding-left: 0 !important;
    /* Fix alignment */
    margin-left: 0 !important;
    /* Fix alignment */
    text-indent: 0 !important;
}

/* Hide hidden inputs to prevents flex gap issues */
.login-remember-container input[type="hidden"] {
    display: none !important;
}

.woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Fix alignment */
    cursor: pointer !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: rgba(0, 0, 0, 0.6) !important;
    width: auto !important;
    padding: 0 !important;
    /* Fix alignment */
    cursor: pointer !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: rgba(0, 0, 0, 0.6) !important;
}

.woocommerce-form__input-checkbox {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border: 1.5px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 5px !important;
    background: white !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.2s !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    /* Reset margin */
}

.woocommerce-form__input-checkbox:checked {
    background: #5E7045 !important;
    border-color: #5E7045 !important;
    box-shadow: 0 2px 4px rgba(94, 112, 69, 0.3) !important;
}

.woocommerce-form__input-checkbox:checked::after {
    content: '' !important;
    position: absolute !important;
    top: 45% !important;
    left: 50% !important;
    width: 5px !important;
    height: 9px !important;
    border: solid white !important;
    border-width: 0 2px 2px 0 !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

/* SUBMIT BUTTON - Sage Green */
.woocommerce-form-login__submit {
    width: 100% !important;
    padding: 12px 20px !important;
    background: #5E7045 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 12px !important;
}

.woocommerce-form-login__submit:hover {
    background: #4A5836 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.woocommerce-form-login__submit:active {
    transform: translateY(1px) !important;
}

/* FORGOT PASSWORD LINK */
.woocommerce-LostPassword {
    margin: 0 0 20px 0 !important;
    text-align: center !important;
}

.woocommerce-LostPassword a {
    font-family: 'Outfit', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: rgba(0, 0, 0, 0.5) !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.woocommerce-LostPassword a:hover {
    color: #5E7045 !important;
}

/* REGISTER LINK AT BOTTOM */
.register-link {
    text-align: center !important;
    margin: 0 !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: rgba(0, 0, 0, 0.5) !important;
}

.register-link a {
    color: #5E7045 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: color 0.2s !important;
}

.register-link a:hover {
    color: #2F5D50 !important;
    text-decoration: underline !important;
}

/* ERROR MESSAGES */
/* NOTIFICATIONS & ERRORS - Inside Card Style */
.login-notices-container {
    width: 100% !important;
    margin-bottom: 20px !important;
}

.login-notices-container:empty {
    display: none !important;
    margin: 0 !important;
}

.woocommerce-notices-wrapper {
    width: 100% !important;
    margin-bottom: 20px !important;
}

.woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.custom-login-container .woocommerce-error,
.custom-login-container .woocommerce-message,
.custom-login-container .woocommerce-info,
.login-notices-container .woocommerce-error,
.login-notices-container .woocommerce-message {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    padding: 16px 18px 16px 50px !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
    border: none !important;
    position: relative !important;
    list-style: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    line-height: 1.5 !important;
    display: block !important;
}

.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce-notices-wrapper ul,
.login-notices-container ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Error icon */
.woocommerce-error::before,
.login-notices-container .woocommerce-error::before {
    content: '!' !important;
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    width: 24px !important;
    height: 24px !important;
    background: #DC2626 !important;
    color: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* Success icon */
.woocommerce-message::before,
.login-notices-container .woocommerce-message::before {
    content: '✓' !important;
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    width: 24px !important;
    height: 24px !important;
    background: #6F7F63 !important;
    color: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* Info icon */
.woocommerce-info::before {
    content: 'i' !important;
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-style: italic !important;
    width: 24px !important;
    height: 24px !important;
    background: #3B82F6 !important;
    color: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* Error style */
.woocommerce-error,
.login-notices-container .woocommerce-error {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%) !important;
    color: #991B1B !important;
    border-left: 4px solid #DC2626 !important;
}

/* Success style */
.woocommerce-message,
.login-notices-container .woocommerce-message {
    background: linear-gradient(135deg, #F0F5F2 0%, #E8EDE5 100%) !important;
    color: #2F3E26 !important;
    border-left: 4px solid #6F7F63 !important;
}

/* Info style */
.woocommerce-info {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%) !important;
    color: #1E40AF !important;
    border-left: 4px solid #3B82F6 !important;
}

/* Strong text inside notices */
.woocommerce-error strong,
.woocommerce-message strong,
.woocommerce-info strong {
    font-weight: 600 !important;
}

/* Links inside notices */
.woocommerce-error a,
.woocommerce-message a,
.woocommerce-info a {
    color: inherit !important;
    text-decoration: underline !important;
    font-weight: 500 !important;
}


/* RESPONSIVE - Mobile Optimization */
@media (max-width: 640px) {
    body.woocommerce-account:not(.logged-in):has(.custom-login-wrapper) .woocommerce {
        padding: 40px 16px 80px;
    }

    .custom-login-wrapper {
        border-radius: 16px !important;
    }

    .custom-login-container {
        padding: 32px 24px 28px !important;
    }

    .custom-login-container h2 {
        font-size: 22px !important;
    }

    .login-subtitle {
        font-size: 13px !important;
    }

    .input-with-icon .woocommerce-Input {
        font-size: 16px !important;
        /* Prevents iOS zoom */
    }
}

/* Fix for Registration Form Styles to Match Login */
.woocommerce-form-register .woocommerce-form-row {
    margin-bottom: 20px !important;
}

.woocommerce-form-register__submit {
    width: 100% !important;
    padding: 12px 20px !important;
    background: #5E7045 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 12px !important;
    margin-top: 10px !important;
}

.woocommerce-form-register__submit:hover {
    background: #4A5836 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Privacy Policy Validation Fix */
.woocommerce-privacy-policy-text {
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: rgba(0, 0, 0, 0.5) !important;
    margin-bottom: 15px !important;
    text-align: center !important;
}

.woocommerce-privacy-policy-link {
    color: #5E7045 !important;
    text-decoration: underline !important;
}

/* ========================================
   CUSTOM LOGIN ALERTS - E-Meniu Style
   ======================================== */

.emeniu-login-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: alertSlideIn 0.3s ease-out;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.emeniu-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.emeniu-alert-message {
    flex: 1;
}

/* Error Alert */
.emeniu-login-alert-error {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #991B1B;
}

.emeniu-login-alert-error .emeniu-alert-icon {
    background: #DC2626;
    color: white;
}

/* Success Alert */
.emeniu-login-alert-success {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #166534;
}

.emeniu-login-alert-success .emeniu-alert-icon {
    background: #22C55E;
    color: white;
}

/* Info Alert */
.emeniu-login-alert-info {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #1E40AF;
}

.emeniu-login-alert-info .emeniu-alert-icon {
    background: #3B82F6;
    color: white;
}

/* Warning Alert */
.emeniu-login-alert-warning {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #92400E;
}

.emeniu-login-alert-warning .emeniu-alert-icon {
    background: #F59E0B;
    color: white;
}