/**
 * wunderly – Landing, Legal & Auth Redesign Styles
 * Verwendet für: Welcome, Impressum, AGB, Datenschutz, Login, Register, PW-Reset
 */

/* ── Landing Page ─────────────────────────────── */

.landing-page {
    min-height: 100dvh;
    background: var(--bg-warm);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px 40px;
    overflow-x: hidden;
}

.landing-logo {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.landing-logo .dot {
    color: var(--color-coral);
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    margin-bottom: 20px;
    animation: fadeInUp 0.6s var(--ease) both;
}

.landing-h1 {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 32px;
    line-height: 1.2;
    text-align: center;
    color: var(--text-primary);
    margin: 0 0 12px;
    animation: fadeInUp 0.6s var(--ease) 0.1s both;
}

.landing-h1 .highlight {
    color: var(--color-coral);
    font-style: italic;
}

.landing-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-mid);
    text-align: center;
    max-width: 340px;
    margin: 0 0 32px;
    animation: fadeInUp 0.6s var(--ease) 0.2s both;
}

/* ── Sort Animation Container ───────────────── */

.sort-animation {
    width: 100%;
    max-width: 340px;
    height: 200px;
    position: relative;
    margin-bottom: 8px;
    animation: fadeInUp 0.6s var(--ease) 0.3s both;
}

.sort-animation__label {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-mid);
    height: 24px;
    margin-bottom: 12px;
    transition: opacity 0.3s var(--ease);
}

.sort-animation__grid {
    position: relative;
    width: 100%;
    height: 170px;
}

.sort-tile {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 1s cubic-bezier(.34,1.56,.64,1), box-shadow 1s cubic-bezier(.34,1.56,.64,1);
    font-size: 28px;
    line-height: 1;
}

.sort-tile__name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-mid);
    margin-top: 4px;
    white-space: nowrap;
}

.sort-tile__user {
    font-size: 9px;
    color: var(--text-light-alt);
    margin-top: 2px;
    opacity: 0;
    transition: opacity 0.5s var(--ease);
}

.sort-tile__user.visible {
    opacity: 1;
}

.sort-tile.checked {
    background: var(--color-green-light);
    border-color: var(--color-success);
}

.sort-tile.fade-out {
    opacity: 0;
    transform: scale(0.8) !important;
}

/* ── Invite Banner ───────────────────────────── */

.invite-banner {
    width: 100%;
    max-width: 340px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-teal-light);
    border: 2px solid var(--color-teal);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s var(--ease) 0.35s both;
}

.invite-banner__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-teal);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.invite-banner__text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.invite-banner__text strong {
    font-weight: 700;
}

/* ── CTA Buttons ─────────────────────────────── */

.landing-cta {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s var(--ease) 0.4s both;
}

.landing-cta .btn {
    flex: 1;
    padding: 14px 0;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.landing-cta .btn:active {
    transform: scale(0.97);
}

.landing-cta .btn--register {
    background: var(--color-coral);
    color: white;
}

.landing-cta .btn--login {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* ── Features ────────────────────────────────── */

.landing-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 340px;
    margin-bottom: 48px;
}

.landing-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.landing-feature__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.landing-feature__icon--sort {
    background: rgba(255, 107, 64, 0.1);
}

.landing-feature__icon--share {
    background: rgba(167, 139, 250, 0.1);
}

.landing-feature__icon--search {
    background: rgba(74, 173, 161, 0.1);
}

.landing-feature__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.landing-feature__desc {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.5;
}

/* ── Footer ──────────────────────────────────── */

.landing-footer {
    display: flex;
    gap: 16px;
    margin-top: auto;
    padding-top: 24px;
}

.landing-footer a {
    font-size: 12px;
    color: var(--text-light-alt);
    text-decoration: none;
}

.landing-footer a:hover {
    color: var(--text-mid);
}

.landing-footer .sep {
    color: var(--text-light-alt);
    font-size: 12px;
}

.legal-footer {
    justify-content: center;
    padding: 24px 20px 32px;
}

/* ── Legal Pages ─────────────────────────────── */

.legal-page {
    min-height: 100dvh;
    background: var(--bg-warm);
}

.legal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-warm);
    border-bottom: 1px solid var(--border);
}

.legal-header__back {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-primary);
    flex-shrink: 0;
}

.legal-header__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.legal-content {
    padding: 24px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 28px 0 12px;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 0 8px;
}

.legal-content p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-mid);
    margin: 0 0 12px;
}

.legal-content ul {
    padding-left: 20px;
    margin: 0 0 12px;
}

.legal-content li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-mid);
    margin-bottom: 4px;
}

.legal-content a {
    color: var(--color-coral);
    text-decoration: none;
}

/* Legal page section cards (from lawyer template) */
.legal-content .sec {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 20px;
    margin-bottom: 12px;
}
.legal-content .sec-num {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-coral);
    margin-bottom: 4px;
}
.legal-content .sec h2 {
    font-size: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin: 0 0 14px;
}
.legal-content .addr {
    background: var(--bg-surface);
    border-left: 3px solid var(--color-coral);
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.8;
}
.legal-content .addr p { margin: 0; }
.legal-content .infobox {
    background: rgba(255, 107, 64, 0.06);
    border-left: 3px solid var(--color-coral);
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 13px;
}
.legal-content .infobox p { margin: 0; color: var(--text-primary); }
.legal-content .formbox {
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 14px 0;
}
.legal-content .formbox .ftitle {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.legal-content .fline {
    padding: 8px 0 4px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-mid);
    margin-bottom: 6px;
}
.legal-content .fline:last-child { border-bottom: none; }
.legal-content strong { color: var(--text-primary); }

/* ── Auth Pages Redesign ─────────────────────── */

.auth-page {
    min-height: 100dvh;
    background: var(--bg-warm);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 24px 40px;
    position: relative;
}

.auth-page__back {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-primary);
}

.auth-page__logo {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 28px;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 8px;
    cursor: pointer;
}

.auth-page__logo .dot {
    color: var(--color-coral);
}

.auth-page__tagline {
    font-size: 14px;
    color: var(--text-mid);
    margin: 0 0 32px;
}

.auth-page__card {
    width: 100%;
    max-width: 360px;
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    box-shadow: var(--shadow-md);
}

.auth-page__footer {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-mid);
}

.auth-page__footer a {
    color: var(--color-coral);
    font-weight: 600;
    text-decoration: none;
}

.auth-page__forgot {
    display: block;
    text-align: right;
    font-size: 13px;
    color: var(--color-coral);
    text-decoration: none;
    margin-top: -4px;
    margin-bottom: 4px;
}

/* ── Checkbox Groups ─────────────────────────── */

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-coral);
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-mid);
}

.checkbox-group label a {
    color: var(--color-coral);
    text-decoration: none;
    font-weight: 600;
}

/* ── Auth Success State ──────────────────────── */

.auth-success {
    text-align: center;
    padding: 20px 0;
}

.auth-success__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.auth-success__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-success__text {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ── Language Switch (öffentliche Seiten) ─────── */

.landing-lang-switch {
    position: absolute;
    top: 16px;
    right: 24px;
    z-index: 20;
    display: flex;
    gap: 6px;
    align-items: center;
}

.lang-switch__btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: border-color 0.2s var(--ease);
}

.lang-switch__btn:hover {
    border-color: var(--text-mid);
}

.lang-switch__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    min-width: 100%;
}

.lang-switch__option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
    transition: background 0.15s var(--ease);
}

.lang-switch__option:hover {
    background: var(--bg-warm);
}

.lang-switch__option.active {
    color: var(--color-coral);
    font-weight: 600;
}

/* ── Dark Mode Overrides ────────────────────── */
[data-theme="dark"] .landing-feature__icon--sort  { background: rgba(255, 107, 64, 0.15); }
[data-theme="dark"] .landing-feature__icon--share { background: rgba(167, 139, 250, 0.15); }
[data-theme="dark"] .landing-feature__icon--search { background: rgba(74, 173, 161, 0.15); }
[data-theme="dark"] .lang-switch__option:hover { background: var(--bg-hover); }

/* ── Fade-in Animation ───────────────────────── */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
