/* Auth Pages Styles */

/* Body-Override für Auth-Seiten */
body:has(.auth-container) {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    height: 100vh !important;
}

html:has(.auth-container) {
    overflow: hidden !important;
    height: 100vh !important;
}

/* Auth Pages - Desktop */
.auth-container {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-style, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    background-attachment: fixed;
    background-size: cover;
    margin: 0;
    padding: 1rem;
}

.auth-card {
    max-width: 400px;
    width: 100%;
    margin: 1rem;
}

/* Mobile Optimierungen - Vollbild ohne Ränder und ohne Farbverlauf - kein Scrollen */
@media (max-width: 768px) {
    .auth-container {
        min-height: 100vh;
        height: 100vh;
        max-height: 100vh;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        /* Kein Farbverlauf auf mobilen Geräten - einfacher Hintergrund */
        background: var(--bs-body-bg, #ffffff) !important;
        background-attachment: scroll !important;
    }

    /* Card entfernen - direktes Formular ohne Ränder */
    .auth-card {
        max-width: 100%;
        width: 100%;
        margin: 0;
        height: 100%;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .auth-card .card {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        height: 100%;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .auth-card .card-body {
        padding: 1.25rem !important;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        max-width: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        max-height: 100vh;
        /* Scrollbar verstecken aber scrollen ermöglichen falls nötig (nur für sehr kleine Geräte) */
        -webkit-overflow-scrolling: touch;
    }

    /* Kompakterer Header auf Mobil - reduziert für kein Scrollen */
    .auth-card h1 {
        font-size: 1.25rem !important;
        margin-bottom: 0.375rem !important;
        font-weight: 600;
        line-height: 1.2;
    }

    .auth-card h1 img {
        height: 32px !important;
        margin-bottom: 0.375rem !important;
    }

    .auth-card h1 i {
        font-size: 1.25rem !important;
    }

    .auth-card h5 {
        font-size: 1rem !important;
        margin-bottom: 0.125rem !important;
        font-weight: 500;
        line-height: 1.3;
    }

    .auth-card p.text-center.text-muted {
        font-size: 0.8125rem;
        margin-bottom: 1rem !important;
        line-height: 1.4;
    }

    /* Formularfelder optimiert - kompakter */
    .auth-card .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
        font-weight: 500;
    }

    .auth-card .form-control {
        font-size: 0.9375rem;
        padding: 0.625rem 0.75rem;
        border-radius: 0.5rem;
        line-height: 1.4;
    }

    .auth-card .mb-3 {
        margin-bottom: 0.875rem !important;
    }

    .auth-card .mb-4 {
        margin-bottom: 1rem !important;
    }

    /* Buttons kompakter aber gut erreichbar */
    .auth-card .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
        font-weight: 500;
        border-radius: 0.5rem;
        margin-top: 0.25rem;
    }

    /* HR kompakter */
    .auth-card hr {
        margin: 1rem 0 !important;
    }

    /* Footer-Links kompakter */
    .auth-card p.text-center {
        font-size: 0.8125rem;
        margin-bottom: 0 !important;
        line-height: 1.4;
    }

    /* Row-Abstände anpassen (für Register-Seite) */
    .auth-card .row {
        margin-left: 0;
        margin-right: 0;
    }

    .auth-card .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0.875rem;
    }

    .auth-card .row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }

    /* Form-Text */
    .auth-card .form-text {
        font-size: 0.75rem;
        margin-top: 0.25rem;
        line-height: 1.3;
    }

    /* Checkbox-Labels kompakter */
    .auth-card .form-check-label {
        font-size: 0.875rem;
        line-height: 1.4;
    }

    .auth-card .form-check-label i {
        font-size: 0.875rem;
    }

    .auth-card .form-check {
        margin-bottom: 0.875rem !important;
    }

    /* Spezifische Optimierungen für Login-Seite (weniger Felder = noch kompakter) */
    .auth-login .auth-card .card-body {
        justify-content: center;
    }

    .auth-login .auth-card h1 {
        margin-bottom: 0.25rem !important;
    }

    .auth-login .auth-card h1 img {
        margin-bottom: 0.25rem !important;
    }

    .auth-login .auth-card p.text-center.text-muted {
        margin-bottom: 0.875rem !important;
    }

    .auth-login .auth-card .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    .auth-login .auth-card hr {
        margin: 0.875rem 0 !important;
    }
}

/* Extra kleine Bildschirme (sehr kleine Handys) - noch kompakter */
@media (max-width: 480px) {
    .auth-card .card-body {
        padding: 1rem !important;
    }

    .auth-card h1 {
        font-size: 1.125rem !important;
        margin-bottom: 0.25rem !important;
    }

    .auth-card h1 img {
        height: 28px !important;
        margin-bottom: 0.25rem !important;
    }

    .auth-card h5 {
        font-size: 0.9375rem !important;
        margin-bottom: 0.125rem !important;
    }

    .auth-card p.text-center.text-muted {
        font-size: 0.75rem;
        margin-bottom: 0.875rem !important;
    }

    .auth-card .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    .auth-card .mb-4 {
        margin-bottom: 0.875rem !important;
    }

    .auth-card .form-label {
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
    }

    .auth-card .form-control {
        font-size: 0.875rem;
        padding: 0.5rem 0.625rem;
    }

    .auth-card .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    .auth-card hr {
        margin: 0.875rem 0 !important;
    }

    .auth-card p.text-center {
        font-size: 0.75rem;
    }
}

/* Landscape-Orientierung auf Mobil optimieren - sehr kompakt */
@media (max-width: 768px) and (orientation: landscape) {
    .auth-container {
        align-items: center;
    }

    .auth-card .card-body {
        padding: 0.75rem 1.25rem !important;
        justify-content: center;
    }

    .auth-card h1 {
        font-size: 1.125rem !important;
        margin-bottom: 0.25rem !important;
    }

    .auth-card h1 img {
        height: 28px !important;
        margin-bottom: 0.25rem !important;
    }

    .auth-card h5 {
        font-size: 0.9375rem !important;
        margin-bottom: 0.125rem !important;
    }

    .auth-card p.text-center.text-muted {
        font-size: 0.75rem;
        margin-bottom: 0.75rem !important;
    }

    .auth-card .mb-3 {
        margin-bottom: 0.625rem !important;
    }

    .auth-card .mb-4 {
        margin-bottom: 0.75rem !important;
    }

    .auth-card .form-label {
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
    }

    .auth-card .form-control {
        font-size: 0.875rem;
        padding: 0.5rem 0.625rem;
    }

    .auth-card .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    .auth-card hr {
        margin: 0.75rem 0 !important;
    }

    .auth-card p.text-center {
        font-size: 0.75rem;
    }
}