/**
 * auth.css — Bliska Psychologia
 * Style stron: /logowanie/ /rejestracja/ /resetuj-haslo/
 * + Auth modal (globalny)
 */

/* ═══════════════════════════════════════════════════════════════
   STRONY FALLBACK
═══════════════════════════════════════════════════════════════ */

.bp-auth-page {
    --bp-navy:      #1B3A4B;
    --bp-teal:      #3D7E8F;
    --bp-teal-dark: #2A6070;
    --bp-cream:     #F4F1EC;
    --bp-card:      #FDFCFA;
    --bp-text:      #1B2E38;
    --bp-muted:     #7A8B95;
    --bp-sep:       #E8E4DC;
    --bp-radius:    12px;
    --bp-radius-sm: 8px;
    --bp-font:      'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --bp-serif:     'Lora', Georgia, serif;

    min-height: auto;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(34px, 4.5vw, 52px) 24px clamp(48px, 5.5vw, 72px);
    font-family: var(--bp-font);
    -webkit-font-smoothing: antialiased;
    background:
        linear-gradient(180deg, rgba(255,255,255,.70) 0%, rgba(244,241,236,.82) 100%),
        #F4F1EC;
}

.bp-auth-page *, .bp-auth-page *::before, .bp-auth-page *::after { box-sizing: border-box; }

.bp-auth-page--login,
.bp-auth-page--reset {
    padding-top: clamp(40px, 5vw, 60px);
    padding-bottom: clamp(52px, 6vw, 76px);
}

.bp-auth-card {
    background: #FDFCFA;
    border: 1px solid #E8E4DC;
    border-radius: var(--bp-radius);
    box-shadow: 0 10px 34px rgba(27,58,75,.10), 0 2px 8px rgba(27,58,75,.05);
    padding: 40px 36px;
    width: 100%;
    max-width: 360px;
}

.bp-auth-card--register {
    max-width: 680px;
    padding: 44px 48px 42px;
}

.bp-auth-card__title {
    font-family: var(--bp-serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: #1B3A4B;
    margin: 0 0 6px 0;
    line-height: 1.2;
    letter-spacing: -.01em;
}

.bp-auth-card__sub {
    font-size: .9rem;
    color: #7A8B95;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.bp-auth-card--register .bp-auth-card__title,
.bp-auth-card--register .bp-auth-card__sub {
    max-width: 430px;
}

.bp-auth-card__footer {
    font-size: .9rem;
    color: #7A8B95;
    text-align: center;
    margin: 20px 0 0;
}

.bp-auth-card__footer a { color: #3D7E8F; font-weight: 600; text-decoration: none; }
.bp-auth-card__footer a:hover { color: #2A6070; text-decoration: underline; }

.bp-auth-card__error,
.bp-auth-card__notice {
    border-radius: var(--bp-radius-sm);
    padding: 12px 16px;
    font-size: .9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.bp-auth-card__error  { background: #FDF2F2; color: #C0392B; border: 1px solid #F5C6C6; }
.bp-auth-card__notice { background: #EBF4F6; color: #2A6070; border: 1px solid #B8DDE6; }

.bp-auth-form { display: flex; flex-direction: column; gap: 2px; }

.bp-auth-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 14px;
}

.bp-auth-form__field {
    min-width: 0;
}

.bp-auth-form__field--wide {
    grid-column: 1 / -1;
}

.bp-google-login-wrap,
.bp-am-google {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 16px 0 12px;
}

.bp-google-login {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 40px;
}

.bp-google-login > div {
    max-width: 100%;
}

.bp-google-login__error {
    display: none;
    width: 100%;
    margin-top: 8px;
    color: #C0392B;
    font-size: .85rem;
    line-height: 1.45;
    text-align: center;
}

.bp-google-login__terms {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.bp-google-login__terms p {
    margin: 0;
    color: #425466;
}

.bp-google-login__field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #1B2E38;
    font-weight: 600;
}

.bp-google-login__field input,
.bp-google-login__field select {
    width: 100%;
    border: 1px solid #D8E1E6;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
}

.bp-google-login__continue {
    align-self: flex-start;
    border: 0;
    border-radius: 8px;
    background: #1B3A4B;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 10px 14px;
}

.bp-auth-divider,
.bp-am-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #7A8B95;
    font-size: .82rem;
    margin: 12px 0 16px;
}

.bp-auth-divider::before,
.bp-auth-divider::after,
.bp-am-divider::before,
.bp-am-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E8E4DC;
}

.bp-auth-form label {
    font-size: .82rem;
    font-weight: 600;
    color: #1B3A4B;
    margin-top: 10px;
    margin-bottom: 4px;
    display: block;
    letter-spacing: .01em;
}

.bp-auth-form__field label {
    margin-top: 0;
}

.bp-auth-form input[type="email"],
.bp-auth-form input[type="password"],
.bp-auth-form input[type="text"] {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1.5px solid #E8E4DC;
    border-radius: var(--bp-radius-sm);
    font-family: var(--bp-font);
    font-size: .9rem;
    color: #1B2E38;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    outline: none;
    -webkit-appearance: none;
}

.bp-auth-form input:focus {
    border-color: #3D7E8F;
    box-shadow: 0 0 0 3px rgba(61,126,143,.12);
}

.bp-auth-form input::placeholder { color: #B0BDC5; }

.bp-auth-form select {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1.5px solid #E8E4DC;
    border-radius: var(--bp-radius-sm);
    font-family: var(--bp-font);
    font-size: .9rem;
    color: #1B2E38;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A8B95' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    transition: border-color .15s ease, box-shadow .15s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.bp-auth-form select:focus {
    border-color: #3D7E8F;
    box-shadow: 0 0 0 3px rgba(61,126,143,.12);
}

.bp-auth-form__hint,
.bp-auth-form__optional { font-weight: 400; color: #7A8B95; font-size: .82rem; }

.bp-auth-form__checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 22px;
    border-top: 1px solid #E8E4DC;
}

.bp-auth-form__check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .875rem;
    color: #7A8B95;
    cursor: pointer;
    line-height: 1.5;
}

.bp-auth-form__check--required { color: #1B2E38; }
.bp-auth-form__check span a { color: #3D7E8F; text-decoration: underline; }
.bp-auth-form__check span a:hover { color: #2A6070; }

.bp-auth-form__check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    accent-color: #3D7E8F;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.bp-auth-form__btn {
    margin-top: 18px;
    width: 100%;
    min-height: 48px;
    padding: 12px 24px;
    background: #3D7E8F;
    color: #fff;
    border: none;
    border-radius: var(--bp-radius-sm);
    font-family: var(--bp-font);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
    letter-spacing: .01em;
}

.bp-auth-form__btn:hover {
    background: #2A6070;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27,58,75,.15);
}

.bp-auth-form__btn:active { transform: translateY(0); }

.bp-password-strength {
    margin-top: 8px;
}

.bp-password-strength__bar {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #E8E4DC;
}

.bp-password-strength__bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #B0BDC5;
    transition: width .18s ease, background .18s ease;
}

.bp-password-strength__label {
    margin-top: 5px;
    color: #7A8B95;
    font-size: .78rem;
    line-height: 1.35;
}

.bp-password-strength.is-weak .bp-password-strength__bar span {
    width: 34%;
    background: #B85C4A;
}

.bp-password-strength.is-medium .bp-password-strength__bar span {
    width: 67%;
    background: #B88A2A;
}

.bp-password-strength.is-strong .bp-password-strength__bar span {
    width: 100%;
    background: #3D7E8F;
}

.bp-password-strength.is-weak .bp-password-strength__label { color: #9A3D31; }
.bp-password-strength.is-medium .bp-password-strength__label { color: #8A641F; }
.bp-password-strength.is-strong .bp-password-strength__label { color: #2A6070; }

.bp-auth-form__forgot {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: .88rem;
    color: #7A8B95;
    text-decoration: none;
}

.bp-auth-form__forgot:hover { color: #3D7E8F; text-decoration: underline; }

@media (max-width: 480px) {
    .bp-auth-page  { padding: 32px 16px 64px; }
    .bp-auth-card  { padding: 28px 20px; }
    .bp-auth-card__title { font-size: 1.25rem; }
}

@media (max-width: 760px) {
    .bp-auth-card--register {
        max-width: 440px;
        padding: 34px 24px 32px;
    }

    .bp-auth-form__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .bp-auth-page  { padding: 40px 16px 80px; }
    .bp-auth-card,
    .bp-auth-card--register { padding: 28px 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH MODAL
═══════════════════════════════════════════════════════════════ */

.bp-am-body-lock { overflow: hidden; }

.bp-am-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(27, 58, 75, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.bp-am-overlay--visible {
    opacity: 1;
    visibility: visible;
}

.bp-am-box {
    background: #FDFCFA;
    border: 1px solid #E8E4DC;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(27, 58, 75, 0.16), 0 2px 8px rgba(27, 58, 75, 0.08);
    width: 100%;
    max-width: 380px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 32px 28px 28px;
    position: relative;
    transform: translateY(8px);
    transition: transform .2s ease;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.bp-am-overlay--visible .bp-am-box { transform: translateY(0); }

.bp-am-box * { box-sizing: border-box; }

.bp-am-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #7A8B95;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color .15s, background .15s;
}

.bp-am-close:hover { color: #1B3A4B; background: #F0EDE8; }

.bp-am-tabs {
    display: flex;
    border-bottom: 1.5px solid #E8E4DC;
    margin-bottom: 20px;
}

.bp-am-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 18px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 500;
    color: #7A8B95;
    cursor: pointer;
    margin-bottom: -1.5px;
    transition: color .15s, border-color .15s;
}

.bp-am-tab--active { color: #1B3A4B; border-bottom-color: #3D7E8F; }
.bp-am-tab:hover:not(.bp-am-tab--active) { color: #1B3A4B; }

.bp-am-panel--hidden { display: none; }

.bp-am-context {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(61,126,143,0.2);
    border-radius: 8px;
    background: #F3FBFA;
    color: #2A6070;
    font-size: .86rem;
    line-height: 1.45;
}

.bp-am-msg {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .875rem;
    margin-bottom: 14px;
    line-height: 1.5;
}

.bp-am-msg--error  { background: #FDF2F2; color: #C0392B; border: 1px solid #F5C6C6; }
.bp-am-msg--notice { background: #EBF4F6; color: #2A6070; border: 1px solid #B8DDE6; }

.bp-am-field { display: flex; flex-direction: column; margin-bottom: 10px; }

.bp-am-field label:not(.bp-am-check) {
    font-size: .8rem;
    font-weight: 600;
    color: #1B3A4B;
    margin-bottom: 4px;
    letter-spacing: .01em;
}

.bp-am-field input[type="email"],
.bp-am-field input[type="password"],
.bp-am-field input[type="text"] {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #E8E4DC;
    border-radius: 8px;
    font-family: inherit;
    font-size: .9rem;
    color: #1B2E38;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
}

.bp-am-field input:focus {
    border-color: #3D7E8F;
    box-shadow: 0 0 0 3px rgba(61, 126, 143, .12);
}

.bp-am-field input::placeholder { color: #B0BDC5; }

.bp-am-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #E8E4DC;
    border-radius: 8px;
    font-family: inherit;
    font-size: .9rem;
    color: #1B2E38;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A8B95' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.bp-am-field select:focus {
    border-color: #3D7E8F;
    box-shadow: 0 0 0 3px rgba(61, 126, 143, .12);
}

.bp-am-hint { font-weight: 400; color: #7A8B95; font-size: .8rem; }

.bp-am-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid #E8E4DC;
}

.bp-am-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: .85rem;
    color: #7A8B95;
    cursor: pointer;
    line-height: 1.5;
    font-weight: 400;
}

.bp-am-check--required { color: #1B2E38; }
.bp-am-check a { color: #3D7E8F; text-decoration: underline; }
.bp-am-check a:hover { color: #2A6070; }

.bp-am-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    min-width: 15px;
    accent-color: #3D7E8F;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.bp-am-btn {
    margin-top: 16px;
    width: 100%;
    padding: 11px 24px;
    background: #3D7E8F;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    letter-spacing: .01em;
    position: relative;
}

.bp-am-btn:hover {
    background: #2A6070;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 58, 75, .15);
}

.bp-am-btn:active { transform: translateY(0); }

.bp-am-btn--loading { color: transparent; pointer-events: none; }

.bp-am-btn--loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bp-am-spin .7s linear infinite;
}

@keyframes bp-am-spin { to { transform: rotate(360deg); } }

.bp-am-forgot {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: .85rem;
    color: #7A8B95;
    text-decoration: none;
}

.bp-am-forgot:hover { color: #3D7E8F; text-decoration: underline; }

.bp-am-switch {
    text-align: center;
    font-size: .875rem;
    color: #7A8B95;
    margin: 14px 0 0;
}

.bp-am-switch a { color: #3D7E8F; font-weight: 600; text-decoration: none; cursor: pointer; }
.bp-am-switch a:hover { color: #2A6070; text-decoration: underline; }

.bp-am-back {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: .85rem;
    color: #7A8B95;
    cursor: pointer;
    margin-bottom: 16px;
}

.bp-am-back:hover { color: #3D7E8F; }

.bp-am-forgot-desc {
    font-size: .875rem;
    color: #7A8B95;
    line-height: 1.6;
    margin: 0 0 16px;
}

@media (max-width: 480px) {
    .bp-am-box  { padding: 24px 18px 20px; }
    .bp-am-tab  { padding: 8px 14px; font-size: .85rem; }
}

/* Mobile nav — przyciski auth jako triggery modalu */
.bp-mob-auth-trigger {
    display: block;
    width: 100%;
    background: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
    text-align: center;
}
