/* Sign-in pages (login, register, reset, set password, email confirm) in the look of healinq.de (healinq repo css/styles.css). */

@font-face {
    font-family: 'Gothic A1';
    src: url('../fonts/GothicA1-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gothic A1';
    src: url('../fonts/GothicA1-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

.auth-body {
    --auth-green: #236130;
    --auth-green-dark: #1b4b26;
    --auth-olive: #4e5b3f;
    --auth-lime: #9abc05;
    --auth-lime-dark: #7a9a04;
    --auth-cream: #fff4c7;
    --auth-border: rgba(35, 97, 48, 0.2);
    --auth-muted: #666666;
    --auth-shadow: 0 2px 15px rgba(35, 97, 48, 0.1);
    --auth-shadow-hover: 0 8px 20px rgba(35, 97, 48, 0.2);

    margin: 0;
    min-height: 100vh;
    font-family: 'Century Gothic', 'Gothic A1', 'CenturyGothic', 'AppleGothic', sans-serif;
    line-height: 1.6;
    color: var(--auth-green);
    /* Same background as the login page (Login-Form-Clean.css). */
    background-color: #f1f7fc;
    background-image: url('../img/background-01.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* —— Layout: welcome panel beside the form —— */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 0 2rem;
    align-content: center;
    max-width: 1080px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

/* Welcome panel in the healinq.de hero colours */
.auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    grid-column: 1;
    grid-row: 1;
    padding: 2.5rem 2.25rem;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-green) 0%, var(--auth-olive) 100%);
    box-shadow: var(--auth-shadow);
    animation: auth-fade-up 0.5s ease-out backwards;
}

.auth-hero-logo {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
    margin-bottom: 2.25rem;
}

.auth-hero-title {
    margin: 0 0 0.75rem;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.auth-hero-sub {
    margin: 0 0 1.75rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-self: flex-start;
}

.auth-hero-link {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-hero-link:hover,
.auth-hero-link:focus {
    color: var(--auth-green);
    background: #fff;
    text-decoration: none;
}

/* —— Card —— */
/* The card and the footer below it sit in the grid themselves, so the panel matches the card's height. */
.auth-main {
    display: contents;
}

.auth-card {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    animation: auth-fade-up 0.5s ease-out 0.1s backwards;
    padding: 2.25rem 2.5rem 2rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(35, 97, 48, 0.1);
    box-shadow: var(--auth-shadow);
}

.auth-step.is-entering {
    animation: auth-step-in 0.3s ease-out;
}

.auth-step.is-entering-back {
    animation: auth-step-in-back 0.3s ease-out;
}

/* —— Stepper: numbered circles on a line —— */
.auth-stepper {
    display: flex;
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.auth-stepper li {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}

.auth-stepper li + li::before {
    content: '';
    position: absolute;
    top: 15px;
    right: calc(50% + 22px);
    left: calc(-50% + 22px);
    height: 2px;
    background: rgba(35, 97, 48, 0.15);
}

.auth-stepper li.is-done + li::before,
.auth-stepper li.is-done + li.is-current::before {
    background: var(--auth-lime);
}

.auth-stepper-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--auth-green);
    background: #fff;
    border: 2px solid rgba(35, 97, 48, 0.25);
}

.auth-stepper li.is-current .auth-stepper-num {
    color: #fff;
    background: var(--auth-green);
    border-color: var(--auth-green);
}

.auth-stepper li.is-done .auth-stepper-num {
    color: #fff;
    background: var(--auth-lime);
    border-color: var(--auth-lime);
}

.auth-stepper-label {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--auth-muted);
}

.auth-stepper li.is-current .auth-stepper-label {
    font-weight: 700;
    color: var(--auth-green);
}

/* —— Steps —— */
.auth-step {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.auth-step[hidden] {
    display: none;
}

.auth-step-title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--auth-green);
}

.auth-step-sub {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    color: var(--auth-muted);
}

/* —— Fields —— */
.auth-field {
    margin-bottom: 1.1rem;
}

.auth-field > label,
.auth-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--auth-green);
}

.auth-optional {
    font-weight: normal;
    color: var(--auth-muted);
}

.auth-input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 0.9rem;
    font-family: inherit;
    font-size: 1rem;
    color: #1f2a24;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

select.auth-input {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23236130' stroke-width='1.8' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
}

.auth-input:hover {
    border-color: rgba(35, 97, 48, 0.4);
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(35, 97, 48, 0.12);
}

.auth-input.is-invalid {
    border-color: var(--color-danger, #c11717);
}

.auth-feedback {
    display: none;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: var(--color-danger, #c11717);
}

.is-invalid ~ .auth-feedback,
.auth-feedback.is-shown {
    display: block;
}

.auth-hint {
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: var(--auth-muted);
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 0.85rem;
}

.auth-row-street {
    grid-template-columns: minmax(0, 1fr) 110px;
}

.auth-row-city {
    grid-template-columns: 120px minmax(0, 1fr);
}

/* Password with show/hide */
.auth-password {
    position: relative;
}

.auth-password .auth-input {
    padding-right: 3rem;
}

.auth-password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
    color: var(--auth-green);
    outline: none;
}

.auth-strength {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.45rem;
    font-size: 0.85rem;
    color: var(--auth-muted);
}

.auth-strength-meter {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.auth-strength-meter span {
    height: 4px;
    border-radius: 2px;
    background: rgba(35, 97, 48, 0.12);
}

.auth-strength[data-level='1'] .auth-strength-meter span:nth-child(-n+1) { background: #d98a00; }
.auth-strength[data-level='2'] .auth-strength-meter span:nth-child(-n+2) { background: var(--auth-lime); }
.auth-strength[data-level='3'] .auth-strength-meter span { background: var(--auth-green); }

.auth-strength-text {
    flex: 0 0 auto;
    min-width: 4.5em;
    text-align: right;
}

/* Gender choice */
.auth-choices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.auth-choice {
    position: relative;
    margin: 0;
}

.auth-choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.auth-choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 0.5rem;
    font-size: 0.95rem;
    color: var(--auth-green);
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-choice span:hover {
    border-color: rgba(35, 97, 48, 0.4);
}

.auth-choice input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(35, 97, 48, 0.15);
}

.auth-choice input:checked + span {
    font-weight: 700;
    background: var(--auth-cream);
    border: 2px solid var(--auth-green);
}

.auth-choices.is-invalid .auth-choice span {
    border-color: var(--color-danger, #c11717);
}

/* —— Note and alerts —— */
.auth-note {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--auth-olive);
}

.auth-alert {
    margin-bottom: 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
}

.auth-alert-danger {
    background: #ffcccc;
    color: #931717;
}

.auth-alert-success {
    background: #eef5e0;
    color: var(--auth-green-dark);
}

.auth-alert-warning {
    background: var(--auth-cream);
    color: var(--auth-olive);
}

/* —— Buttons, like the healinq.de pill buttons —— */
.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.9rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-btn:focus {
    outline: none;
}

.auth-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(35, 97, 48, 0.25);
}

.auth-btn-primary {
    margin-left: auto;
    color: #fff;
    background: var(--auth-lime);
}

.auth-btn-primary:hover {
    color: #fff;
    text-decoration: none;
    background: var(--auth-lime-dark);
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-hover);
}

.auth-btn-primary:disabled {
    opacity: 0.7;
    cursor: progress;
    transform: none;
    box-shadow: none;
}

.auth-btn-secondary {
    color: var(--auth-green);
    background: transparent;
    border-color: var(--auth-green);
}

.auth-btn-secondary:hover {
    color: #fff;
    text-decoration: none;
    background: var(--auth-green);
}

.auth-btn[hidden] {
    display: none;
}

.auth-btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
}

.auth-btn.is-busy .auth-btn-spinner {
    display: inline-block;
}

.auth-login-link {
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(35, 97, 48, 0.1);
    text-align: center;
    font-size: 0.95rem;
    color: var(--auth-muted);
}

.auth-login-link a {
    font-weight: 700;
    color: var(--auth-green);
}

/* —— Success —— */
.auth-success {
    text-align: center;
}

.auth-success[hidden] {
    display: none;
}

.auth-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.8rem;
    color: var(--auth-green);
    background: var(--auth-cream);
}

.auth-success-email {
    margin: 0.5rem 0 1rem;
    font-weight: 700;
    color: var(--auth-green);
    word-break: break-all;
}

.auth-success-text {
    color: var(--auth-green);
}

.auth-success-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

.auth-success-actions .auth-btn-primary {
    margin-left: 0;
}

/* —— Footer under the card: one slim bar with language, legal links and the 2bring credit —— */
.auth-footer {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
    padding: 0.7rem 1.1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(35, 97, 48, 0.08);
    font-size: 0.85rem;
}

.auth-lang-switch {
    display: inline-flex;
    padding: 3px;
    border-radius: 50px;
    background: rgba(35, 97, 48, 0.08);
}

.auth-lang-switch button {
    min-width: 38px;
    padding: 0.2rem 0.6rem;
    border: 0;
    border-radius: 50px;
    background: transparent;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--auth-green);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.auth-lang-switch button:hover,
.auth-lang-switch button:focus-visible {
    background: rgba(35, 97, 48, 0.12);
    outline: none;
}

.auth-lang-switch button.is-active {
    color: #fff;
    background: var(--auth-green);
}

.auth-footer-links {
    display: flex;
    gap: 1.1rem;
}

.auth-footer-links a {
    color: var(--auth-green);
    text-decoration: none;
}

.auth-footer-links a:hover,
.auth-footer-links a:focus {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-made-by {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-muted);
    text-decoration: none;
    font-size: 0.75rem;
}

.auth-made-by:hover,
.auth-made-by:focus {
    color: var(--auth-green);
    text-decoration: none;
}

.auth-made-by img {
    display: block;
    height: 26px;
    width: auto;
}

/* —— Shared by the single-form pages (login, reset, set password, email confirm) —— */
.auth-card-title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--auth-green);
}

.auth-card-sub {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    color: var(--auth-muted);
}

.auth-text {
    color: var(--auth-green);
}

.auth-stack {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.auth-btn-block {
    width: 100%;
    margin-left: 0;
}

.auth-text-link {
    display: block;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--auth-green);
    cursor: pointer;
}

.auth-text-link:hover,
.auth-text-link:focus {
    color: var(--auth-green-dark);
}

/* Bootstrap alerts and field errors that the page scripts toggle */
.auth-card .alert {
    margin-bottom: 1.1rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 10px;
    font-size: 0.9rem;
}

.auth-card .alert-danger {
    background: #ffcccc;
    color: #931717;
}

.auth-card .alert-success {
    background: #eef5e0;
    color: var(--auth-green-dark);
}

.auth-card .alert-warning,
.auth-card .alert-info {
    background: var(--auth-cream);
    color: var(--auth-olive);
}

.auth-card .alert .close {
    color: inherit;
    text-shadow: none;
}

.auth-card .invalid-feedback {
    font-size: 0.85rem;
    color: var(--color-danger, #c11717);
}

.auth-card .auth-input.is-invalid ~ .invalid-feedback {
    display: block;
}

.auth-card .form-text {
    margin-top: 0.3rem;
    font-size: 0.85rem;
}

.auth-input[readonly] {
    color: var(--auth-muted);
    background: #f6f8f6;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

@keyframes auth-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-step-in {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes auth-step-in-back {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-hero,
    .auth-card,
    .auth-step.is-entering,
    .auth-step.is-entering-back {
        animation: none;
    }
}

/* —— Tablets and phones: panel on top, compact —— */
@media (max-width: 860px) {
    .auth-footer {
        justify-content: center;
        margin-top: 0;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        min-height: 0;
        max-width: 640px;
        padding: 1rem 0.75rem 2rem;
    }

    .auth-hero,
    .auth-card,
    .auth-footer {
        grid-column: 1;
        grid-row: auto;
    }

    .auth-hero {
        padding: 1.5rem 1.5rem 1.6rem;
        text-align: center;
    }

    .auth-hero-actions {
        align-self: center;
        justify-content: center;
    }

    .auth-hero-logo {
        width: 200px;
        margin: 0 auto 1.25rem;
    }

    .auth-hero-title {
        font-size: 1.6rem;
        margin-bottom: 0.4rem;
    }

    .auth-hero-sub {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .auth-hero-link {
        padding: 0.45rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .auth-card {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .auth-step-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 420px) {
    .auth-row,
    .auth-row-city {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-row-street {
        grid-template-columns: minmax(0, 1fr) 90px;
    }

    .auth-choices {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-btn {
        padding: 0.8rem 1.4rem;
    }
}
