/* ============================================================
   Feelgood Membership – Account-Formulare & Dashboard
   ============================================================ */

/* --- Layout (Theme-Variablen aus theme.json) --- */

/* Dashboard + Locked: wideSize (wie Header), mit Container-Padding */
.feelgood-dashboard,
.feelgood-locked {
    width: 100%;
    max-width: var(--wp--style--global--wide-size, 80rem);
    margin-inline: auto;
    padding-inline: var(--wp--custom--container-padding, clamp(1.25rem, 1.00rem + 1.25vw, 2rem));
    padding-block: var(--wp--preset--spacing--8, 2rem);
}

/* Login/Registrierung: schmal + zentriert */
.feelgood-form--register,
.feelgood-form--login {
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
    padding-inline: var(--wp--custom--container-padding, clamp(1.25rem, 1.00rem + 1.25vw, 2rem));
    padding-block: var(--wp--preset--spacing--8, 2rem);
}

/* --- Formulare --- */

.feelgood-dashboard__section--narrow {
    /* Hintergrund über gesamte Viewport-Breite */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
    background: var(--wp--preset--color--sage-mist, #eef5ef);
    padding-block: var(--wp--preset--spacing--8, 2rem);
}

.feelgood-dashboard__section--narrow > * {
    max-width: var(--wp--style--global--content-size, 50rem);
    margin-inline: auto;
}

.feelgood-form__field {
    margin-bottom: var(--wp--preset--spacing--4, 1rem);
}

.feelgood-form__field label {
    display: block;
    font-family: var(--wp--preset--font-family--jost, sans-serif);
    font-size: var(--wp--preset--font-size--sm, 0.875rem);
    font-weight: 500;
    color: var(--wp--preset--color--text-headline, #2a2f2b);
    margin-bottom: 0.35rem;
}

.feelgood-form__field input[type="text"],
.feelgood-form__field input[type="email"],
.feelgood-form__field input[type="password"] {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--wp--preset--color--sand, #e6ddd0);
    border-radius: var(--wp--custom--radius--md, 0.5rem);
    font-family: var(--wp--preset--font-family--jost, sans-serif);
    font-size: var(--wp--preset--font-size--base, 1rem);
    color: var(--wp--preset--color--text-body, #474d48);
    background: var(--wp--preset--color--warm-white, #faf8f4);
    transition: border-color 0.2s ease;
}

.feelgood-form__field input:focus {
    outline: none;
    border-color: var(--wp--preset--color--petrol, #3a8585);
    box-shadow: 0 0 0 2px rgba(58, 133, 133, 0.15);
}

.feelgood-form__row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--wp--preset--spacing--4, 1rem);
}

@media (max-width: 30rem) {
    .feelgood-form__row--half {
        grid-template-columns: 1fr;
    }
}

.feelgood-form__field--checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

.feelgood-form__field--checkbox input[type="checkbox"] {
    accent-color: var(--wp--preset--color--petrol, #3a8585);
}

.feelgood-form__footer {
    text-align: center;
    font-size: var(--wp--preset--font-size--sm, 0.875rem);
    color: var(--wp--preset--color--text-muted, #8c9490);
    margin-top: var(--wp--preset--spacing--5, 1.25rem);
}

.feelgood-form__footer a {
    color: var(--wp--preset--color--petrol, #3a8585);
    text-decoration: underline;
}

/* --- Buttons --- */

.feelgood-btn {
    display: inline-block;
    padding: 0.7rem 1.75rem;
    border: none;
    border-radius: var(--wp--custom--radius--md, 0.5rem);
    font-family: var(--wp--preset--font-family--jost, sans-serif);
    font-size: var(--wp--preset--font-size--base, 1rem);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-align: center;
    text-decoration: none;
    line-height: 1.4;
}

.feelgood-btn--primary {
    width: 100%;
    background: var(--wp--preset--color--sage, #7a9e80);
    color: #fff;
}

.feelgood-btn--primary:hover {
    background: var(--wp--preset--color--sage-deep, #4e7a58);
}

.feelgood-btn--ghost {
    background: transparent;
    border: 1px solid var(--wp--preset--color--petrol, #3a8585);
    color: var(--wp--preset--color--petrol, #3a8585);
}

.feelgood-btn--ghost:hover {
    background: var(--wp--preset--color--petrol, #3a8585);
    color: #fff;
}

/* --- Notices --- */

.feelgood-notice {
    padding: 0.75rem 1rem;
    border-radius: var(--wp--custom--radius--md, 0.5rem);
    margin-bottom: var(--wp--preset--spacing--5, 1.25rem);
    font-size: var(--wp--preset--font-size--sm, 0.875rem);
}

.feelgood-notice p {
    margin: 0.2rem 0;
}

.feelgood-notice--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.feelgood-notice--success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

/* --- Dashboard --- */


.feelgood-dashboard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--wp--preset--spacing--6, 1.5rem);
}

.feelgood-dashboard__header h2 {
    font-family: var(--wp--preset--font-family--cormorant-garamond, serif);
    font-size: var(--wp--preset--font-size--2-xl, 1.75rem);
    color: var(--wp--preset--color--text-headline, #2a2f2b);
    margin: 0;
}

.feelgood-dashboard__section {
    margin-bottom: var(--wp--preset--spacing--8, 2rem);
}

.feelgood-dashboard__section h3 {
    font-family: var(--wp--preset--font-family--cormorant-garamond, serif);
    font-size: var(--wp--preset--font-size--xl, 1.25rem);
    color: var(--wp--preset--color--text-headline, #2a2f2b);
    margin-bottom: var(--wp--preset--spacing--4, 1rem);
    padding-bottom: var(--wp--preset--spacing--2, 0.5rem);
    border-bottom: 1px solid var(--wp--preset--color--sand, #e6ddd0);
}

.feelgood-dashboard__empty {
    color: var(--wp--preset--color--text-muted, #8c9490);
    font-style: italic;
}

.feelgood-dashboard__card {
    background: var(--wp--preset--color--warm-white, #faf8f4);
    border: 1px solid var(--wp--preset--color--sand, #e6ddd0);
    border-radius: var(--wp--custom--radius--lg, 1rem);
    padding: var(--wp--preset--spacing--5, 1.25rem);
    margin-bottom: var(--wp--preset--spacing--3, 0.75rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--wp--preset--spacing--4, 1rem);
}

.feelgood-dashboard__card-info h4 {
    margin: 0 0 0.25rem 0;
    font-family: var(--wp--preset--font-family--jost, sans-serif);
    font-size: var(--wp--preset--font-size--base, 1rem);
    font-weight: 500;
    color: var(--wp--preset--color--text-headline, #2a2f2b);
}

.feelgood-dashboard__card-meta {
    font-size: var(--wp--preset--font-size--sm, 0.875rem);
    color: var(--wp--preset--color--text-muted, #8c9490);
}

.feelgood-dashboard__badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--wp--custom--radius--sm, 0.25rem);
    font-size: var(--wp--preset--font-size--xs, 0.75rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.feelgood-dashboard__badge--active {
    background: #dcfce7;
    color: #166534;
}

.feelgood-dashboard__badge--expired {
    background: #fef2f2;
    color: #991b1b;
}

.feelgood-dashboard__badge--cancelled {
    background: #fefce8;
    color: #854d0e;
}

@media (max-width: 30rem) {
    .feelgood-dashboard__card {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- Locked Content --- */

.feelgood-locked {
    text-align: center;
    padding: var(--wp--preset--spacing--10, 3rem) var(--wp--preset--spacing--6, 1.5rem);
    background: var(--wp--preset--color--sage-mist, #eef5ef);
    border-radius: var(--wp--custom--radius--lg, 1rem);
    max-width: 32rem;
    margin: var(--wp--preset--spacing--8, 2rem) auto;
}

.feelgood-locked__icon {
    font-size: 2.5rem;
    margin-bottom: var(--wp--preset--spacing--4, 1rem);
}

.feelgood-locked h3 {
    font-family: var(--wp--preset--font-family--cormorant-garamond, serif);
    font-size: var(--wp--preset--font-size--xl, 1.25rem);
    color: var(--wp--preset--color--text-headline, #2a2f2b);
    margin-bottom: var(--wp--preset--spacing--3, 0.75rem);
}

.feelgood-locked p {
    color: var(--wp--preset--color--text-body, #474d48);
    margin-bottom: var(--wp--preset--spacing--5, 1.25rem);
}

.feelgood-locked__actions {
    display: flex;
    gap: var(--wp--preset--spacing--3, 0.75rem);
    justify-content: center;
    flex-wrap: wrap;
}

.feelgood-locked__actions .feelgood-btn {
    width: auto;
}

.feelgood-locked-inline {
    padding: 0.5rem 0.85rem;
    background: var(--wp--preset--color--sage-mist, #eef5ef);
    border-radius: var(--wp--custom--radius--sm, 0.25rem);
    font-size: var(--wp--preset--font-size--sm, 0.875rem);
    display: inline-block;
}

.feelgood-locked-inline a {
    color: var(--wp--preset--color--petrol, #3a8585);
    text-decoration: underline;
}

/* --- Reduced Motion --- */

@media (prefers-reduced-motion: reduce) {
    .feelgood-form__field input,
    .feelgood-btn {
        transition: none;
    }
}
