/*
 * First Telecom – Keycloak Login Branding

 *
 * Brand Colors (aus www.first-telecom.de):
 *   #011624  – Dunkelblau (Hintergrund / Header)
 *   #004f91  – Blau       (Primäraktion / Buttons)
 *   #b4c6d6  – Hellblau   (subtile Akzente)
 *
 * Parent-Theme: keycloak (PatternFly v1 HTML-Struktur)
 * Keycloak-Version: 26.x
 */

/* ─── Hintergrund ─────────────────────────────────────────── */

.login-pf {
    background: none;
}

.login-pf body {
    background: linear-gradient(160deg, #011624 0%, #013a62 55%, #004f91 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Haupt-Container zentriert & begrenzt ───────────────── */

.login-pf .container {
    max-width: 480px;
    width: 100%;
    padding: 0 16px;
    /* Override Bootstrap/PatternFly full-width container */
    float: none !important;
    margin: 0 auto !important;
}

/* ─── Login-Karte ─────────────────────────────────────────── */

.login-pf .card-pf {
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(1, 22, 36, 0.55);
    padding: 32px 40px 24px;
    background: #ffffff;
}

/* ─── Logo ────────────────────────────────────────────────── */

#kc-header {
    overflow: visible;
    text-align: center;
    margin-bottom: 24px;
}

/* KC 26.x: Logo direkt auf #kc-header-wrapper als Background */
#kc-header-wrapper {
    background-image: url(../img/logo.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center center;
    height: 56px;
    width: 260px;
    margin: 0 auto 8px;
    padding: 0;
    white-space: normal;
    /* Realm-Text ausblenden */
    font-size: 0;
    color: transparent;
}

/* Fallback: ältere KC-Versionen mit div.kc-logo-text */
div.kc-logo-text {
    background-image: url(../img/logo.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    height: 56px;
    width: 260px;
    margin: 0 auto 8px;
}

div.kc-logo-text span {
    display: none;
}

/* ─── Formulartitel ───────────────────────────────────────── */

h1#kc-page-title {
    color: #011624;
    font-size: 18px;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 4px;
    text-align: center;
}

/* ─── Labels & Texte ──────────────────────────────────────── */

.pf-c-form__label,
label {
    color: #011624;
    font-weight: 500;
}

/* ─── Primär-Button (Anmelden) ────────────────────────────── */

.pf-c-button.pf-m-primary,
#kc-login {
    background-color: #004f91 !important;
    border-color: #004f91 !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 3px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pf-c-button.pf-m-primary:hover,
#kc-login:hover,
#kc-login:focus {
    background-color: #003a6e !important;
    border-color: #003a6e !important;
}

/* ─── Links ───────────────────────────────────────────────── */

a,
.login-pf a {
    color: #004f91;
}

a:hover,
.login-pf a:hover {
    color: #003a6e;
    text-decoration: underline;
}

/* ─── Fehlermeldungen ─────────────────────────────────────── */

.pf-c-alert.pf-m-danger {
    border-left-color: #cc0000;
}

.pf-c-alert__title {
    font-size: var(--pf-global--FontSize--sm);
    font-weight: 600;
}

/* ─── Sprach-Dropdown ─────────────────────────────────────── */

#kc-locale ul {
    background-color: #ffffff;
    display: none;
    top: 20px;
    min-width: 100px;
    padding: 0;
    border: 1px solid #b4c6d6;
    border-radius: 3px;
}

#kc-locale-dropdown {
    display: inline-block;
}

#kc-locale-dropdown:hover ul {
    display: block;
}

#kc-locale-dropdown a,
#kc-locale-dropdown button {
    color: #b4c6d6;
    font-size: var(--pf-global--FontSize--sm);
    background: none;
    border: none;
    cursor: pointer;
}

button#kc-current-locale-link::after {
    content: "\2c5";
    margin-left: var(--pf-global--spacer--xs);
}

/* ─── Checkbox / "Angemeldet bleiben" ────────────────────── */

#kc-form-options .checkbox {
    margin-top: 0;
    color: #4a5568;
}

/* ─── Info-Footer innerhalb der Karte ────────────────────── */

#kc-info {
    margin: 20px -40px -24px;
}

#kc-info-wrapper {
    font-size: 13px;
    padding: 15px 35px;
    background-color: #f5f7fa;
    border-top: 1px solid #b4c6d6;
    border-radius: 0 0 6px 6px;
    color: #4a5568;
}

/* ─── Sonstiges ───────────────────────────────────────────── */

#kc-content {
    width: 100%;
}

#kc-content-wrapper {
    margin-top: 16px;
}

#kc-form-wrapper {
    margin-top: 10px;
}

.pf-c-button.pf-m-control {
    border-color: rgba(180, 198, 214, 0.6);
}

textarea.pf-c-form-control {
    height: auto;
}

p.instruction {
    margin: 5px 0;
}

#kc-registration {
    margin-bottom: 0;
}

#kc-terms-text {
    margin-bottom: 20px;
}
