/* ============================================================
   Bits & Friends · Videokonferenz – Branding für meet.nc4.io
   Schwedische Farbwelt im hellen Design:
   Blau  #005B99 / #006AA7   Gelb  #FFCD00
   ============================================================ */

:root {
    --nc4-blue: #005b99;
    --nc4-blue-dark: #00436f;
    --nc4-blue-soft: #e8f1f8;
    --nc4-yellow: #ffcd00;
    --nc4-yellow-soft: #fff7d6;
    --nc4-ink: #10202b;
    --nc4-muted: #5a7183;
    --nc4-line: #dbe6ef;
    --nc4-surface: #ffffff;
    --nc4-bg: #f4f8fb;
    --nc4-radius: 16px;
    --nc4-shadow: 0 18px 40px -24px rgba(11, 44, 68, 0.35), 0 2px 6px rgba(11, 44, 68, 0.05);
}

/* Grundfläche ------------------------------------------------- */

html,
body {
    min-height: 100%;
}

body,
body.is-boxed {
    background:
        radial-gradient(1200px 600px at 50% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #f7fafc 0%, var(--nc4-bg) 100%);
    color: var(--nc4-ink);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.body-wrap {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    width: 100%;
}

/* Google-Translate-Widget ausblenden -------------------------- */

#google_translate_element,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Kopfzeile --------------------------------------------------- */

.site-header {
    padding: 28px 0 8px;
    background: transparent;
    border: 0;
    position: static;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.header-brand h1 {
    margin: 0;
    line-height: 0;
}

#headerLogo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(16, 32, 43, 0.08);
    background: #fff;
}

/* Hauptbereich ------------------------------------------------- */

.site-content {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px 40px;
}

.hero.section,
.hero.section.center-card-section {
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    display: flex;
    justify-content: center;
}

.hero .container {
    width: 100%;
    max-width: 480px;
    padding: 0;
}

.hero-inner {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Karte ------------------------------------------------------- */

.login-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 44px 40px 36px;
    background: var(--nc4-surface);
    border: 1px solid var(--nc4-line);
    border-radius: 20px;
    box-shadow: var(--nc4-shadow);
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--nc4-blue) 0 50%, var(--nc4-yellow) 50% 100%);
}

/* Logo im Kartenkopf statt Schloss-Symbol --------------------- */

.login-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 18px;
    border: 0;
    border-radius: 0;
    background: url('../images/nc4-logo.png') center / contain no-repeat;
    box-shadow: none;
    color: transparent;
}

.login-icon i,
.login-icon svg {
    display: none !important;
}

/* Typografie -------------------------------------------------- */

.login-title,
.join-room-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--nc4-ink);
    margin: 0 0 8px;
}

.login-description {
    color: var(--nc4-muted);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0 0 26px;
}

/* Formular ---------------------------------------------------- */

.login-form-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 50px;
    margin-bottom: 14px;
    padding: 0 14px;
    background: #fbfdff;
    border: 1px solid var(--nc4-line);
    border-radius: 12px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input-group:focus-within {
    background: #fff;
    border-color: var(--nc4-blue);
    box-shadow: 0 0 0 3px rgba(0, 91, 153, 0.14);
}

.login-input-group > i {
    width: 20px;
    color: var(--nc4-blue);
    font-size: 15px;
    text-align: center;
    flex: 0 0 auto;
}

.login-input-group .form-input {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    margin: 0 0 0 10px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 15px;
    color: var(--nc4-ink);
    text-align: left;
}

.login-input-group .form-input:focus {
    outline: none;
    box-shadow: none;
    border: 0;
}

.login-input-group .form-input::placeholder {
    color: #8fa3b3;
}

.password-toggle {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    margin-left: 6px;
    border: 0;
    background: transparent;
    color: var(--nc4-muted);
    cursor: pointer;
    border-radius: 8px;
}

.password-toggle:hover {
    color: var(--nc4-blue);
    background: var(--nc4-blue-soft);
}

/* Fehlermeldung ------------------------------------------------ */

.login-error {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fdeef0;
    border: 1px solid #f3c9cf;
    color: #9b1c2c;
    font-size: 13.5px;
    text-align: center;
}

.login-error.is-visible,
.login-error[style*='display: flex'] {
    display: flex;
}

/* Schaltflächen ------------------------------------------------ */

.login-btn,
.join-room-btn,
.random-room-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    margin: 4px 0 0;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--nc4-blue);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(0, 91, 153, 0.6);
    transition: background 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
}

.login-btn:hover,
.join-room-btn:hover {
    background: var(--nc4-blue-dark);
    box-shadow: 0 8px 20px -8px rgba(0, 91, 153, 0.7);
}

.login-btn:active,
.join-room-btn:active {
    transform: translateY(1px);
}

.login-btn:focus-visible,
.join-room-btn:focus-visible,
.random-room-btn:focus-visible {
    outline: 3px solid var(--nc4-yellow);
    outline-offset: 2px;
}

.login-btn.pulse {
    animation: none;
}

/* Raum-Auswahl (nach Anmeldung) -------------------------------- */

.room-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.room-input-row .login-input-group {
    flex: 1 1 auto;
    margin-bottom: 0;
}

.room-input-row .random-room-btn {
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--nc4-blue);
    border: 1px solid var(--nc4-line);
    box-shadow: none;
    flex: 0 0 auto;
}

.room-input-row .random-room-btn:hover {
    background: var(--nc4-blue-soft);
    border-color: var(--nc4-blue);
}

.login-error span {
    line-height: 1.4;
}

/* Hinweise unter dem Formular ---------------------------------- */

.login-note {
    margin: 18px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--nc4-muted);
    text-align: center;
}

.login-note a {
    color: var(--nc4-blue);
    text-decoration: none;
    border-bottom: 2px solid var(--nc4-yellow);
}

.login-note a:hover {
    color: var(--nc4-blue-dark);
}

/* Fußzeile ---------------------------------------------------- */

.site-footer,
#footer {
    flex: 0 0 auto;
    padding: 0 16px 28px;
    background: transparent;
    border: 0;
    text-align: center;
}

.site-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-social-links,
.footer-links,
.footer-brand {
    display: none !important;
}

.footer-copyright {
    font-size: 12.5px;
    color: var(--nc4-muted);
    text-align: center;
    line-height: 1.6;
}

.footer-copyright strong {
    color: var(--nc4-ink);
    font-weight: 600;
}

/* Reveal-Animationen neutralisieren ---------------------------- */

.reveal-from-top,
.reveal-from-bottom,
.reveal-scale-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* Kleine Bildschirme ------------------------------------------ */

@media (max-width: 520px) {
    .login-card {
        padding: 34px 22px 28px;
        border-radius: 16px;
    }

    .login-icon {
        width: 68px;
        height: 68px;
        margin-bottom: 14px;
    }

    .login-title {
        font-size: 21px;
    }

    .site-header {
        padding-top: 20px;
    }
}


/* Dekorative Hero-Grafik der Vorlage vollständig entfernen ------ */

.hero-figure,
.anime-element,
.hero-figure-box,
.site-header::before,
.site-header::after {
    display: none !important;
}

.hero-inner {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.login-card {
    max-width: 420px !important;
    padding: 28px 32px 24px !important;
}

.login-icon {
    width: 72px !important;
    height: 72px !important;
    margin-bottom: 14px !important;
}

.login-title {
    font-size: 22px !important;
    margin-bottom: 6px !important;
}

.login-description {
    margin-bottom: 20px !important;
}

.login-input-group {
    height: 44px !important;
    margin-bottom: 14px !important;
}

.login-btn,
.join-room-btn {
    height: 46px !important;
}

.site-header {
    padding: 20px 0 4px !important;
}

.site-content {
    padding: 0 16px 24px !important;
}

.site-footer,
#footer {
    padding: 0 16px 14px !important;
}


/* Dunkle Vorlagenfläche des Wrappers neutralisieren -------------- */

.body-wrap {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Eine Marke, kein doppeltes Logo -------------------------------- */

.login-icon {
    display: none !important;
}

.site-header-inner {
    gap: 14px;
}

.site-header-inner h1 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nc4-wordmark {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--nc4-ink);
    line-height: 1;
}

/* Ladeanzeige nur im Ladezustand -------------------------------- */

.login-btn-loader {
    display: none;
}

.login-btn.is-loading .login-btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-btn.is-loading #loginBtnText {
    display: none;
}

/* Lesbare Platzhalter ------------------------------------------ */

.login-input-group .form-input::placeholder {
    color: #6b7f8e;
    opacity: 1;
}


/* Vertikale Balance: Logo + Karte als zentrierte Gruppe ---------- */

body,
body.is-boxed {
    justify-content: flex-start;
}

.body-wrap {
    justify-content: flex-start;
    padding: 0;
}

.site-header {
    padding: 0 0 14px !important;
}

.site-content {
    flex: 1 0 auto !important;
    padding: 0 16px 18px !important;
}

.login-card {
    max-width: 400px !important;
}

/* Persistente Feldbeschriftungen --------------------------------- */

.nc4-label {
    display: block;
    margin: 0 0 6px 2px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--nc4-muted);
    text-align: left;
}

.login-input-group {
    margin-bottom: 16px !important;
}

/* Kontrast ------------------------------------------------------- */

.login-description {
    color: #4b6272 !important;
    font-size: 14.5px !important;
}

.login-input-group .form-input::placeholder {
    color: #5f7383 !important;
}

.footer-copyright,
.footer-copyright a {
    font-size: 12px !important;
    color: #5f7383 !important;
}

/* Fußzeile kompakt halten -------------------------------------- */

.site-footer,
#footer {
    padding: 0 16px 16px !important;
    min-height: 0 !important;
    margin: 0 !important;
}

.site-footer .container,
.site-footer-inner {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
}


/* Kompaktere Karte, damit alles ohne Scrollen passt -------------- */

.login-card { padding: 26px 32px 22px !important; }
.login-title { font-size: 21px !important; margin-bottom: 6px !important; }
.login-description { margin-bottom: 16px !important; font-size: 14px !important; }
.nc4-label { margin-bottom: 5px !important; font-size: 12px !important; }
.login-input-group { height: 42px !important; margin-bottom: 12px !important; }
.login-btn { height: 44px !important; margin-top: 2px !important; }

.nc4-foot-line {
    display: block;
    line-height: 1.7;
}
.footer-copyright a.nc4-foot-line { color: #005b99 !important; text-decoration: none; }
.login-card::before { border-radius: 20px 20px 0 0; }

/* Sichtbarkeit der beiden Formularzustände -----------------------
   landing.css blendet #joinRoomForm per ID aus; login.css (nicht
   mehr geladen) lieferte die .show-Regel. Hier explizit definiert. */

.login-form-section {
    display: flex;
    flex-direction: column;
}

#joinRoomForm:not(.show) {
    display: none !important;
}

.login-form-section.show {
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    transform: none !important;
}

.login-form-section.show + .login-form-section.show {
    display: none !important;
}

#joinRoomForm.show {
    margin-top: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

#joinRoomForm .login-input-group {
    background: #fbfdff;
}

/* Fußzeile: zwei klar getrennte Zeilen --------------------------- */

.footer-copyright .nc4-foot-line {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
}

.footer-copyright a.nc4-foot-line {
    margin-top: 2px !important;
}

/* Eingabetext: schwarz, lesbar auf weißem Feld ------------------- */

.login-input-group .form-input,
.login-input-group input,
.login-input-group select,
.login-input-group textarea,
#username,
#password,
#selectRoom {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    caret-color: #000000 !important;
    opacity: 1 !important;
    font-weight: 500 !important;
    background-color: transparent !important;
}

/* Autofill von Chrome/Edge nicht weiß überschreiben -------------- */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
select:-webkit-autofill {
    -webkit-text-fill-color: #000000 !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    caret-color: #000000 !important;
}

/* Beschriftungen und Fließtext kontrastreicher ------------------ */

.nc4-label {
    color: #22333f !important;
}

.login-description {
    color: #3a5265 !important;
}

.login-input-group .form-input::placeholder {
    color: #4e626f !important;
    -webkit-text-fill-color: #4e626f !important;
    opacity: 1 !important;
}

.footer-copyright,
.footer-copyright a {
    color: #44586a !important;
}

.login-input-group > i,
.password-toggle {
    color: #005b99 !important;
}

/* Select im Raumformular ---------------------------------------- */

#selectRoom option {
    color: #000000;
    background: #ffffff;
}
