/* =============================================================================
   ULFUR AUTH PAGES - Minimal layout additions only.
   All colors, fonts, buttons, containers inherit from Astra.
   ============================================================================= */

/* Auth pages: make #page fill viewport height */
.ulfur-auth #page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.ulfur-auth #content { flex: 1; }

/* --- Two-column grid (equal width) --- */
.ulfur-auth__body {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 48px;
    align-items: start;
    padding: 48px 0;
}
.ulfur-auth__image-col { display: flex; align-items: center; justify-content: center; }
.ulfur-auth__image-placeholder {
    width: 100%; aspect-ratio: 4 / 3;
    background: var(--ast-global-color-6); border-radius: 16px;
}
.ulfur-auth__image {
    aspect-ratio: 1;
    width: 100%; height: auto;
    border-radius: 16px; object-fit: cover;
}

/* --- Shared utility: muted --- */
.ulfur-auth__muted { opacity: 0.7; transition: opacity 0.2s; }
.ulfur-auth__muted:hover { opacity: 1; }

/* --- Shared utility: plain link --- */
.ulfur-auth__link { text-decoration: none; }
.ulfur-auth__link:hover { color: var(--ast-global-color-0); }

/* --- Shared utility: accent link (bold) --- */
.ulfur-auth__link--accent { font-weight: 700; text-decoration: none; }
.ulfur-auth__link--accent:hover { color: var(--ast-global-color-0); }

/* --- Headings --- */
.ulfur-auth__title { margin: 0 0 8px; }
.ulfur-auth__subtitle { margin: 0 0 32px; }

/* --- Form fields --- */
.ulfur-auth__fields { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.ulfur-auth__field { position: relative; }

/* Validation */
.ulfur-auth__field--error input { border-color: #ef4444 !important; }
.ulfur-auth__field--success input { border-color: #22c55e !important; }
.ulfur-auth__field-status {
    position: absolute; right: 12px; top: 22px; transform: translateY(-50%);
    pointer-events: none;
}
.ulfur-auth__field-error-text { font-size: 0.8rem; color: #ef4444; margin-top: 4px; }

/* --- Password toggle - fully transparent --- */
.ulfur-auth__pwd-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none !important; border: none; color: inherit; opacity: 0.5;
    cursor: pointer; padding: 4px; z-index: 1;
    -webkit-appearance: none; appearance: none;
}
.ulfur-auth__pwd-toggle:hover { opacity: 1; background: none !important; }
.ulfur-auth__pwd-toggle:focus { outline: none; background: none !important; }
.ulfur-auth__field--has-toggle input { padding-right: 44px !important; }
.ulfur-auth__field--has-status input { padding-right: 44px !important; }
.ulfur-auth__field--has-toggle.ulfur-auth__field--has-status input { padding-right: 72px !important; }
.ulfur-auth__field--has-toggle .ulfur-auth__field-status { right: 40px; }

/* --- Forgot password --- */
.ulfur-auth__forgot { text-align: right; margin-bottom: 16px; }

/* --- Orange button override - full-width (form only, not modal) --- */
.ulfur-auth__form-col .ast-button,
.ulfur-auth__form-col button[type="submit"] {
    background-color: var(--ast-global-color-0) !important;
    color: #fff !important;
    border: none !important;
    width: 100%;
    box-sizing: border-box;
}

/* --- Autofill background fix (dark theme - form only, not modal) --- */
.ulfur-auth__form-col input:-webkit-autofill,
.ulfur-auth__form-col input:-webkit-autofill:hover,
.ulfur-auth__form-col input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--ast-global-color-5, #1a1a2e) inset !important;
    -webkit-text-fill-color: var(--ast-global-color-3, #e8e8ed) !important;
    transition: background-color 5000s ease-in-out 0s;
}
.ulfur-auth-modal input:-webkit-autofill,
.ulfur-auth-modal input:-webkit-autofill:hover,
.ulfur-auth-modal input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

/* --- Forgot modal notification --- */
.ulfur-auth-modal__msg {
    padding: 10px 14px; border-radius: 8px; margin: 0 0 16px;
    font-size: 13px; line-height: 1.5; display: none;
}
.ulfur-auth-modal__msg--success { display: block; background: #dcfce7; color: #166534; border: 1px solid #22c55e; }
.ulfur-auth-modal__msg--error { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #ef4444; }

/* --- Separator --- */
.ulfur-auth__separator { text-align: center; opacity: 0.5; margin: 8px 0; }

/* --- Social login --- */
.ulfur-auth__social { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

/* --- Social login buttons (Google / Apple) — grayed-out placeholders until a
   social-login plugin is installed; markup mirrors the brands' official
   button designs so the layout is ready to go live as soon as it hooks in. --- */
.ulfur-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 42px;
    box-sizing: border-box;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    filter: grayscale(1);
    opacity: 0.55;
    cursor: not-allowed;
}
.ulfur-social-btn--google { background: #fff; border: 1.5px solid #dcdcdc; color: #1f1f1f; }
.ulfur-social-btn--apple  { background: #000; border: 1.5px solid #000;    color: #fff; }
.ulfur-social-btn__icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ulfur-social-btn__text { line-height: 1; }

/* No hover effect — these are inert placeholders, not real buttons. Overrides
   the site-wide `button:hover, a:hover { opacity: 1 !important }` (global.css)
   which would otherwise un-gray them on hover. */
.ulfur-social-btn:hover,
.ulfur-social-btn:focus {
    opacity: 0.55 !important;
    filter: grayscale(1) !important;
    cursor: not-allowed !important;
    background: inherit;
    color: inherit;
    border-color: inherit;
}
.ulfur-social-btn--google:hover,
.ulfur-social-btn--google:focus { background: #fff; border-color: #dcdcdc; color: #1f1f1f; }
.ulfur-social-btn--apple:hover,
.ulfur-social-btn--apple:focus { background: #000; border-color: #000; color: #fff; }

/* --- Divider --- */
.ulfur-auth__divider { border: none; border-top: 1px solid var(--ast-global-color-7); margin: 16px 0; }

/* --- Switch text (centered) --- */
.ulfur-auth__switch { margin-bottom: 16px; text-align: center; }

/* --- Back button --- */
.ulfur-auth__back {
    display: inline-block; padding: 8px 24px;
    border: 1.5px solid color-mix(in srgb, var(--ast-global-color-3) 50%, transparent);
    border-radius: 8px; text-decoration: none; background: transparent; cursor: pointer;
}
.ulfur-auth__back:hover { border-color: var(--ast-global-color-0); color: var(--ast-global-color-0); }

/* --- Consents --- */
.ulfur-auth__consents { margin: 24px 0 16px; }
.ulfur-auth__consents-title { font-weight: 700; margin: 0 0 16px; }
.ulfur-auth__consent { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ulfur-auth__consent label { cursor: pointer; }
.ulfur-auth__consent--master { font-weight: 700; margin-bottom: 12px; }
.ulfur-auth__consent a { color: var(--ast-global-color-0); text-decoration: underline; }

/* --- Hide WooCommerce "Your personal data..." --- */
.ulfur-auth .woocommerce-privacy-policy-text { display: none; }

/* --- Password strength --- */
.ulfur-auth__pwd-strength { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 0.75rem; }
.ulfur-auth__pwd-rule { color: #ef4444; }
.ulfur-auth__pwd-rule::before { content: '● '; }
.ulfur-auth__pwd-rule--pass { color: #22c55e; }

/* --- Thank-you page --- */
.ulfur-auth--thankyou .ast-main-header-wrap { display: none; }
.ulfur-auth--thankyou #content { display: flex; justify-content: center; align-items: center; }

.ulfur-auth__thankyou { flex: 1; display: flex; align-items: center; justify-content: center; }
.ulfur-auth__thankyou-card {
    text-align: center;
    border: 1.5px solid color-mix(in srgb, var(--ast-global-color-3) 50%, transparent);
    border-radius: 16px; padding: 64px 48px; max-width: 520px; width: 100%;
}
.ulfur-auth__thankyou-icon { margin-bottom: 32px; }
.ulfur-auth__thankyou-icon svg,
.ulfur-auth__thankyou-icon img { width: 120px; height: auto; }
.ulfur-auth__thankyou-title { font-weight: 700; margin: 0 0 16px; }

/* --- Social follow --- */
.ulfur-auth__social-follow { margin-top: 32px; }
.ulfur-auth__social-icons { display: flex; justify-content: center; gap: 24px; }
.ulfur-auth__social-icons a { transition: color 0.2s; text-decoration: none; }
.ulfur-auth__social-icons a:hover { color: var(--ast-global-color-0); }
.ulfur-auth__social-icons svg { width: 24px; height: 24px; fill: currentColor; }

/* --- WooCommerce notices (auth pages - inline style) --- */
.ulfur-auth .woocommerce-error { padding: 12px 16px; border-radius: 8px; list-style: none; margin: 0 0 16px; background: rgba(239,68,68,0.15); border: 1px solid #ef4444; color: #fca5a5; }
.ulfur-auth .woocommerce-message { padding: 12px 16px; border-radius: 8px; list-style: none; margin: 0 0 16px; background: rgba(34,197,94,0.15); border: 1px solid #22c55e; color: #86efac; }

/* =============================================================================
   FORGOT PASSWORD MODAL - same pattern as ulfur-cart-modal
   ============================================================================= */
.ulfur-auth-modal {
    position: fixed; inset: 0; z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ulfur-auth-modal.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.ulfur-auth-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
.ulfur-auth-modal__dialog {
    position: relative; width: 90%; max-width: 440px;
    background: #fff; border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); overflow: hidden;
    transform: scale(0.95) translateY(15px); opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}
.ulfur-auth-modal.is-active .ulfur-auth-modal__dialog { transform: scale(1) translateY(0); opacity: 1; }
.ulfur-auth-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; border-bottom: 1px solid #e8e8e8;
}
.ulfur-auth-modal__title { font-size: 17px; font-weight: 700; color: #1a1a1a; }
.ulfur-auth-modal__close {
    background: none; border: none; font-size: 24px; color: #999;
    cursor: pointer; padding: 0 4px; line-height: 1; transition: color 0.15s;
}
.ulfur-auth-modal__close:hover { color: #333; }
.ulfur-auth-modal__body { padding: 24px; }
.ulfur-auth-modal__body p { margin: 0 0 16px; font-size: 14px; color: #555; line-height: 1.5; }
.ulfur-auth-modal__body input[type="email"] {
    width: 100%; height: 42px; padding: 0 14px; box-sizing: border-box;
    border: 1.5px solid #ccc; border-radius: 8px; font-size: 14px;
    outline: none; transition: border-color 0.2s; color: #1a1a1a; background: #fff;
}
.ulfur-auth-modal__body input[type="email"]:focus { border-color: var(--ast-global-color-0); }
.ulfur-auth-modal__footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; border-top: 1px solid #e8e8e8;
}
.ulfur-auth-modal__cancel { background: none; border: none; color: #666; cursor: pointer; font-size: 14px; padding: 0; }
.ulfur-auth-modal__cancel:hover { color: #333; }
/* STAŁY rozmiar we wszystkich stanach — bez kurczenia po kliknięciu (Astra
   zmienia padding na :focus/:active). */
.ulfur-auth-modal__submit,
.ulfur-auth-modal__submit:hover,
.ulfur-auth-modal__submit:focus,
.ulfur-auth-modal__submit:active {
    padding: 10px 24px !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .ulfur-auth__body { grid-template-columns: 1fr; gap: 32px; }
    .ulfur-auth__image-col { display: none; }
    .ulfur-auth__thankyou-card { padding: 48px 24px; }
}

/* Nr 43: rzad przyciskow powrotu (Strona Glowna + Sklep) */
.ulfur-auth__back-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Border przycisku powrotu nie znika po kliknieciu (focus/active) */
.ulfur-auth__back:focus,
.ulfur-auth__back:active,
.ulfur-auth__back:focus-visible {
    border: 1.5px solid var(--ast-global-color-0) !important;
    color: var(--ast-global-color-0) !important;
    outline: none !important;
}
