/* =========================================
   Auth Pages Styles (Login / Register)
   ========================================= */

/* Main Layout Background */
.y-l-auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-bottom: var(--y-spacing-90);
}

/* --- Hero Section (Camel Image) --- */
.y-c-auth-hero {
    width: var(--y-percent-100);
    height: var(--y-size-300);
    position: relative;
    margin-bottom: var(--y-spacing-neg-10);
    /* Visual overlap */
}

.y-c-auth-hero img {
    width: var(--y-percent-100);
    height: var(--y-percent-100);
    object-fit: cover;
}

/* --- Auth Card --- */
.y-c-auth-card {
    background-color: var(--y-color-primary-text);
    border: 1px solid var(--y-color-border-blured);
    border-radius: var(--y-radius-16);
    padding: var(--y-spacing-40);
    width: var(--y-percent-90);
    max-width: var(--y-size-500);
    margin-top: calc(-1 * var(--y-size-80));
    /* Negative margin to pull card up over hero */
    z-index: var(--y-z-2);
    box-shadow: var(--y-shadow-sm);
    position: relative;
    text-align: center;
}

.y-c-auth-title {
    font-family: var(--y-font-family-Cairo);
    font-size: var(--y-font-size-32);
    font-weight: var(--y-font-weight-700);
    color: var(--y-color-secondary-text);
    margin-bottom: var(--y-spacing-30);
}

/* --- Form Elements --- */
.y-c-auth-form {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--y-spacing-20) !important;
    text-align: right !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.y-c-form-group {
    margin-bottom: var(--y-spacing-15) !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
    display: block !important;
}

.y-c-form-label {
    display: block !important;
    margin-bottom: var(--y-spacing-8) !important;
    font-weight: var(--y-font-weight-600) !important;
    color: var(--y-color-secondary-text) !important;
    font-size: var(--y-font-size-16) !important;
    font-family: var(--y-font-family-Cairo) !important;
    line-height: normal !important;
    text-align: right !important;
}

.y-c-form-label .required {
    color: var(--y-color-error) !important;
}

.y-c-auth-input-group {
    position: relative;
}

.y-c-auth-input {
    width: var(--y-percent-100);
    padding: var(--y-spacing-10) var(--y-spacing-15);
    border: 1px solid var(--y-color-border-blured);
    border-radius: var(--y-radius-8);
    font-family: var(--y-font-family-Cairo);
    font-size: var(--y-font-size-16);
    background-color: var(--y-color-primary-text2);
    /* Explicit white for inputs */
    color: var(--y-color-secondary-text);
    transition: var(--y-transition-default);
    box-sizing: border-box;
    outline: none;
}

.y-c-auth-input:focus {
    border-color: var(--y-color-primary);
    outline: none;
    box-shadow: none;
}

/* Override WooCommerce default input styles for auth forms */
.y-c-auth-form .y-c-auth-input,
.y-c-auth-form input.y-c-auth-input,
.y-c-auth-form input[type="text"],
.y-c-auth-form input[type="email"],
.y-c-auth-form input[type="password"],
.y-c-auth-form .woocommerce-Input,
.y-c-auth-form .woocommerce-Input--text,
.y-c-auth-form .input-text,
.y-c-auth-form input.woocommerce-Input,
.y-c-auth-form input.woocommerce-Input--text,
.y-c-auth-form input.input-text {
    width: var(--y-percent-100) !important;
    padding: var(--y-spacing-10) var(--y-spacing-15) !important;
    border: 1px solid var(--y-color-border-blured) !important;
    border-radius: var(--y-radius-8) !important;
    font-family: var(--y-font-family-Cairo) !important;
    font-size: var(--y-font-size-16) !important;
    background-color: var(--y-color-primary-text2) !important;
    color: var(--y-color-secondary-text) !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    line-height: normal !important;
    height: auto !important;
    min-height: auto !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.y-c-auth-form .y-c-auth-input:focus,
.y-c-auth-form input.y-c-auth-input:focus,
.y-c-auth-form input[type="text"]:focus,
.y-c-auth-form input[type="email"]:focus,
.y-c-auth-form input[type="password"]:focus,
.y-c-auth-form .woocommerce-Input:focus,
.y-c-auth-form .woocommerce-Input--text:focus,
.y-c-auth-form .input-text:focus,
.y-c-auth-form input.woocommerce-Input:focus,
.y-c-auth-form input.woocommerce-Input--text:focus,
.y-c-auth-form input.input-text:focus {
    border-color: var(--y-color-primary) !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: var(--y-color-primary-text2) !important;
}

/* Override WooCommerce form styles */
.y-c-auth-form.woocommerce-form,
.y-c-auth-form.woocommerce-form-register,
.y-c-auth-form.woocommerce-form-login,
.y-c-auth-form.register,
.y-c-auth-form.login {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--y-spacing-20) !important;
    text-align: right !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Override WooCommerce form row styles */
.y-c-auth-form .woocommerce-form-row,
.y-c-auth-form .form-row,
.y-c-auth-form .woocommerce-form-row--wide,
.y-c-auth-form .form-row-wide {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
}

/* Override WooCommerce label styles */
.y-c-auth-form label,
.y-c-auth-form .woocommerce-form__label,
.y-c-auth-form label.woocommerce-form__label {
    display: block !important;
    margin-bottom: var(--y-spacing-8) !important;
    font-weight: var(--y-font-weight-600) !important;
    color: var(--y-color-secondary-text) !important;
    font-size: var(--y-font-size-16) !important;
    font-family: var(--y-font-family-Cairo) !important;
    line-height: normal !important;
    text-align: right !important;
}

/* Override WooCommerce button styles */
.y-c-auth-form button,
.y-c-auth-form .y-c-auth-btn,
.y-c-auth-form .woocommerce-button,
.y-c-auth-form .button,
.y-c-auth-form button.woocommerce-button,
.y-c-auth-form button.button,
.y-c-auth-form input[type="submit"],
.y-c-auth-form .woocommerce-form-register__submit,
.y-c-auth-form .woocommerce-form-login__submit {
    width: var(--y-percent-100) !important;
    background-color: var(--y-color-primary) !important;
    color: var(--y-color-primary-text) !important;
    border: none !important;
    padding: var(--y-spacing-15) !important;
    border-radius: var(--y-radius-8) !important;
    font-family: var(--y-font-family-Cairo) !important;
    font-size: var(--y-font-size-18) !important;
    font-weight: var(--y-font-weight-700) !important;
    cursor: pointer !important;
    margin-top: var(--y-spacing-20) !important;
    text-align: center !important;
    transition: var(--y-transition-default) !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
    line-height: normal !important;
    height: auto !important;
    min-height: auto !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.y-c-auth-form button:hover,
.y-c-auth-form .y-c-auth-btn:hover,
.y-c-auth-form .woocommerce-button:hover,
.y-c-auth-form .button:hover,
.y-c-auth-form button.woocommerce-button:hover,
.y-c-auth-form button.button:hover,
.y-c-auth-form input[type="submit"]:hover,
.y-c-auth-form .woocommerce-form-register__submit:hover,
.y-c-auth-form .woocommerce-form-login__submit:hover {
    background-color: var(--y-color-primary-hover) !important;
    color: var(--y-color-primary-text) !important;
    box-shadow: none !important;
}

.y-c-auth-form button:focus,
.y-c-auth-form .y-c-auth-btn:focus,
.y-c-auth-form .woocommerce-button:focus,
.y-c-auth-form .button:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Password Toggle Icon */
.y-c-password-toggle {
    position: absolute;
    left: var(--y-spacing-15);
    top: 50%;
    transform: translateY(-50%);
    color: var(--y-color-border);
    cursor: pointer;
    font-size: var(--y-font-size-18);
    z-index: var(--y-z-2);
    user-select: none;
    pointer-events: auto;
    transition: color 0.2s ease;
}

.y-c-password-toggle:hover {
    color: var(--y-color-primary);
}

/* WooCommerce Notices inside Auth Forms */
.y-c-auth-form .woocommerce-error,
.y-c-auth-form .woocommerce-message,
.y-c-auth-form .woocommerce-info,
.y-c-auth-form .woocommerce-notice {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: var(--y-radius-8);
    padding: var(--y-spacing-15) var(--y-spacing-20);
    margin-bottom: var(--y-spacing-20);
    color: #721c24;
    font-size: var(--y-font-size-14);
    text-align: right;
    line-height: 1.6;
}

.y-c-auth-form .woocommerce-message,
.y-c-auth-form .woocommerce-info {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.y-c-auth-form .woocommerce-error::before,
.y-c-auth-form .woocommerce-message::before,
.y-c-auth-form .woocommerce-info::before {
    display: none;
}

.y-c-auth-form .woocommerce-error strong,
.y-c-auth-form .woocommerce-message strong,
.y-c-auth-form .woocommerce-info strong {
    font-weight: var(--y-font-weight-700);
}

/* Info Text (Password auto-generated message) */
.y-c-auth-info-text {
    font-size: var(--y-font-size-14);
    color: var(--y-color-secondary-text);
    line-height: 1.6;
    margin: var(--y-spacing-10) 0 var(--y-spacing-20) 0;
    text-align: right;
}

/* Privacy Policy Text Styling */
.y-c-auth-form .woocommerce-privacy-policy-text {
    margin: var(--y-spacing-20) 0 var(--y-spacing-15) 0;
    padding: 0;
    font-size: var(--y-font-size-14);
    line-height: 1.6;
    color: var(--y-color-secondary-text);
    text-align: right;
}

.y-c-auth-form .woocommerce-privacy-policy-text p {
    margin: 0;
    padding: 0;
}

.y-c-auth-form .woocommerce-privacy-policy-text a {
    color: var(--y-color-primary);
    text-decoration: underline;
}

.y-c-auth-form .woocommerce-privacy-policy-text a:hover {
    text-decoration: none;
}

/* Hide page title above auth forms */
body.woocommerce-account .entry-header,
body.woocommerce-account .entry-title,
body.woocommerce-account h1.entry-title,
body.woocommerce-account .page-header,
body.woocommerce-account .page-title,
body.woocommerce-account h1.page-title,
body.woocommerce-account .woocommerce-MyAccount-content > h1,
body.woocommerce-account .woocommerce-MyAccount-content > h2,
body.woocommerce-account .woocommerce-MyAccount-content > .entry-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.y-c-password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* Options Row (Forgot Password & Remember Me) */
.y-c-auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--y-spacing-10);
    font-size: var(--y-font-size-14);
}

/* Checkbox Styling */
.y-c-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--y-spacing-8);
    cursor: pointer;
    color: var(--y-color-secondary-text);
    flex-direction: row-reverse;
    /* Label then box */
}

.y-c-checkbox-wrapper input[type="checkbox"] {
    accent-color: var(--y-color-primary);
    width: var(--y-size-16);
    height: var(--y-size-16);
}

/* Links */
.y-c-auth-link {
    color: var(--y-color-secondary-text);
    text-decoration: underline;
    font-weight: var(--y-font-weight-600);
    transition: var(--y-transition-default);
}

.y-c-auth-link:hover {
    color: var(--y-color-primary);
}

/* Bottom Text */
.y-c-auth-footer-text {
    text-align: center !important;
    margin-top: var(--y-spacing-20) !important;
    font-size: var(--y-font-size-14) !important;
    color: var(--y-color-secondary-text) !important;
    font-family: var(--y-font-family-Cairo) !important;
    line-height: normal !important;
    padding: 0 !important;
}

.y-c-auth-footer-link {
    color: var(--y-color-primary) !important;
    font-weight: var(--y-font-weight-700) !important;
    text-decoration: none !important;
    font-family: var(--y-font-family-Cairo) !important;
}

.y-c-auth-footer-link:hover {
    text-decoration: underline !important;
    color: var(--y-color-primary-hover) !important;
}

.y-c-auth-description {
    font-size: var(--y-font-size-16);
    color: var(--y-color-secondary-text);
    margin-bottom: var(--y-spacing-20);
}

/* Responsive */
@media (max-width: 768px) {
    .y-c-auth-card {
        margin-top: calc(-1 * var(--y-size-40));
        padding: var(--y-spacing-30);
    }

    .y-c-auth-title {
        font-size: var(--y-font-size-24);
    }
}