/* recht.nl login theme.
   Matches the recht.nl site header (rnl-web): a near-black masthead with the
   white wordmark, an off-white/warm secondary surface, a single blue accent
   used sparingly, sharp/boxy radii, and system-UI sans for chrome with a
   serif headline for the page title — no dark mode, no illustration, no
   gradients, matching the source site exactly.
   Built on top of PatternFly (inherited via stylesCommon from the "keycloak"
   parent theme) — only the palette, typography and brand bar are added
   here, so every inherited login/registration/2FA/WebAuthn template keeps
   working without needing its own CSS. */

:root {
    --ink: #1a1a1a;
    --ink-muted: #6b6b6b;
    --paper: #ffffff;
    --surface: #f7f5f2;
    --border: #e2ded4;

    --primary: #3377cc;
    --primary-hover: #2a5fa3;
    --error: #b00020;

    --header-bg: #151515;
    --header-text: #ffffff;
    --header-text-muted: #999999;

    /* Buttons use the masthead's near-black rather than the blue accent
       (which stays reserved for links/active states, matching rnl-web). */
    --button-bg: #151515;
    --button-bg-hover: #2e2e2e;

    --radius-sm: 2px;
    --radius-md: 4px;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.15);

    --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-serif: Georgia, "Times New Roman", Times, serif;
}

/* Re-theme the PatternFly primary/link tokens so every inherited component
   (buttons, alerts, focus rings, the select-authenticator list, ...) picks
   up the recht.nl palette automatically. */
.login-pf {
    --pf-global--primary-color--100: var(--button-bg);
    --pf-global--primary-color--200: var(--button-bg-hover);
    --pf-global--link--Color: var(--primary);
    --pf-global--link--Color--hover: var(--primary-hover);
    --pf-global--Color--100: var(--ink);
    --pf-global--Color--200: var(--ink-muted);
    --pf-global--Color--300: var(--ink-muted);
    --pf-global--BorderColor--100: var(--border);
    --pf-global--danger-color--100: var(--error);
    --pf-global--danger-color--200: var(--error);
    background: none;
}

/* PatternFly v3 sets ".login-pf body" (html carries kcHtmlClass="login-pf")
   to a "bg-login.jpg" watermark via the "background" shorthand — matching
   that exact selector, not just "body", is required to fully clear it. */
.login-pf body,
body {
    background: var(--paper);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    font-family: var(--font-ui);
}

/* Brand bar: the recht.nl masthead, reproduced from the site header. */
#kc-brand-bar {
    background: var(--header-bg);
    color: var(--header-text);
    width: 100%;
    flex: none;
}

#kc-brand-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

#kc-brand-logo {
    width: 160px;
    height: auto;
    display: block;
}

#kc-brand-tagline {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--header-text-muted);
}

#kc-main {
    flex: 1;
    width: 100%;
    display: flex;
    min-width: 0;
}

.login-pf-page {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    box-sizing: border-box;
}

/* On wide (desktop) viewports the masthead becomes a permanent left column
   instead of a top strip, with the form filling the rest — same two-column
   split used by the lexiq theme's side panel. */
@media (min-width: 1024px) {
    .login-pf body,
    body {
        flex-direction: row;
        align-items: stretch;
    }

    #kc-brand-bar {
        width: 38%;
        max-width: 460px;
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #kc-brand-bar-inner {
        max-width: none;
        padding: 40px;
    }
}

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

.pf-c-form-control {
    font-family: var(--font-ui);
    background-color: var(--paper);
    color: var(--ink);
    border-color: var(--border);
    border-radius: var(--radius-md);
}

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

p.instruction {
    margin: 5px 0;
    color: var(--ink-muted);
}

.pf-c-button {
    font-family: var(--font-ui);
    font-weight: 700;
    border-radius: var(--radius-md);
    box-shadow: none;
}

.pf-c-button.pf-m-primary {
    background-color: var(--button-bg);
}

.pf-c-button.pf-m-primary:hover,
.pf-c-button.pf-m-primary:focus {
    background-color: var(--button-bg-hover);
}

.pf-c-button.pf-m-control {
    background-color: var(--paper);
    border-color: var(--border);
    color: var(--ink);
}

h1#kc-page-title {
    margin-top: 10px;
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--ink);
}

#kc-locale ul {
    background-color: var(--paper);
    border: 1px solid var(--border);
    display: none;
    top: 20px;
    min-width: 100px;
    padding: 0;
}

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

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

#kc-locale-dropdown a {
    color: var(--ink-muted);
    text-align: right;
    font-size: var(--pf-global--FontSize--sm);
}

#kc-locale-dropdown button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--ink-muted);
    text-align: right;
    font-size: var(--pf-global--FontSize--sm);
}

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

.login-pf .container {
    padding-top: 10px;
}

.login-pf a {
    color: var(--primary);
}

.login-pf a:hover {
    color: var(--primary-hover);
}

#kc-logo {
    width: 100%;
}

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

#kc-header {
    color: var(--ink-muted);
    overflow: visible;
    white-space: nowrap;
    text-align: center;
}

#kc-header-wrapper {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.2em;
    padding: 0 10px 12px;
    white-space: normal;
    color: var(--ink-muted);
}

#kc-content {
    width: 100%;
}

#kc-attempted-username {
    font-size: 20px;
    font-family: inherit;
    font-weight: normal;
    padding-right: 10px;
}

#kc-username {
    text-align: center;
    margin-bottom: -10px;
}

#kc-webauthn-settings-form {
    padding-top: 8px;
}

#kc-form-webauthn .select-auth-box-parent {
    pointer-events: none;
}

#kc-form-webauthn .select-auth-box-desc {
    color: var(--ink-muted);
}

#kc-form-webauthn .select-auth-box-headline {
    color: var(--primary-hover);
}

#kc-form-webauthn .select-auth-box-icon {
    flex: 0 0 3em;
}

#kc-form-webauthn .select-auth-box-icon-properties {
    margin-top: 10px;
    font-size: 1.8em;
    color: var(--primary);
}

#kc-form-webauthn .select-auth-box-icon-properties.unknown-transport-class {
    margin-top: 3px;
}

#kc-form-webauthn .pf-l-stack__item {
    margin: -1px 0;
}

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

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

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

#kc-info-wrapper {
    font-size: 13px;
    padding: 15px 35px;
    background-color: var(--surface);
    color: var(--ink-muted);
}

#kc-form-options span {
    display: block;
}

#kc-form-options .checkbox {
    margin-top: 0;
    color: var(--ink-muted);
}

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

#kc-registration-terms-text {
    max-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 5px;
}

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

/* TOTP */

.subtitle {
    text-align: right;
    margin-top: 30px;
    color: var(--ink-muted);
}

.required {
    color: var(--error);
}

ol#kc-totp-settings {
    margin: 0;
    padding-left: 20px;
}

ul#kc-totp-supported-apps {
    margin-bottom: 10px;
}

#kc-totp-secret-qr-code {
    max-width: 150px;
    max-height: 150px;
    border: 1px solid var(--border);
    padding: 8px;
    background: var(--paper);
}

#kc-totp-secret-key {
    background-color: var(--surface);
    color: var(--ink);
    font-size: 16px;
    padding: 10px 0;
}

/* OAuth */

#kc-oauth h3 {
    margin-top: 0;
}

#kc-oauth ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#kc-oauth ul li {
    border-top: 1px solid var(--border);
    font-size: 12px;
    padding: 10px 0;
}

#kc-oauth ul li:first-of-type {
    border-top: 0;
}

#kc-oauth .kc-role {
    display: inline-block;
    width: 50%;
}

/* Code */
#kc-code textarea {
    width: 100%;
    height: 8em;
}

/* Social */
.kc-social-links {
    margin-top: 20px;
}

.kc-social-links li {
    width: 100%;
}

.kc-social-provider-logo {
    font-size: 23px;
    width: 30px;
    height: 25px;
    float: left;
}

.kc-social-gray {
    color: var(--ink-muted);
}

.kc-social-gray h2 {
    font-size: 1em;
}

.kc-social-item {
    margin-bottom: var(--pf-global--spacer--sm);
    font-size: 15px;
    text-align: center;
    border-color: var(--border) !important;
}

.kc-social-provider-name {
    position: relative;
}

.kc-social-icon-text {
    left: -15px;
}

.kc-social-grid {
    display: grid;
    grid-column-gap: 10px;
    grid-row-gap: 5px;
    grid-column-end: span 6;
    --pf-l-grid__item--GridColumnEnd: span 6;
}

.kc-social-grid .kc-social-icon-text {
    left: -10px;
}

.kc-login-tooltip {
    position: relative;
    display: inline-block;
}

.kc-social-section {
    text-align: center;
}

.kc-social-section hr {
    margin-bottom: 10px;
    border-color: var(--border);
}

.kc-login-tooltip .kc-tooltip-text {
    top: -3px;
    left: 160%;
    background-color: var(--ink);
    visibility: hidden;
    color: var(--paper);

    min-width: 130px;
    text-align: center;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 5px;

    position: absolute;
    opacity: 0;
    transition: opacity 0.5s;
}

/* Show tooltip */
.kc-login-tooltip:hover .kc-tooltip-text {
    visibility: visible;
    opacity: 0.9;
}

/* Arrow for tooltip */
.kc-login-tooltip .kc-tooltip-text::after {
    content: " ";
    position: absolute;
    top: 15px;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent var(--ink) transparent transparent;
}

@media (min-width: 768px) {
    #kc-container-wrapper {
        position: absolute;
        width: 100%;
    }

    .login-pf .container {
        padding-right: 80px;
    }

    #kc-locale {
        position: relative;
        text-align: right;
        z-index: 9999;
    }
}

@media (max-width: 767px) {
    #kc-brand-bar-inner {
        padding: 20px 16px 16px;
    }

    #kc-brand-logo {
        width: 130px;
    }

    #kc-header {
        padding-left: 15px;
        padding-right: 15px;
        float: none;
        text-align: left;
    }

    #kc-header-wrapper {
        font-size: 12px;
        letter-spacing: 1px;
    }

    #kc-form {
        float: none;
    }

    #kc-info-wrapper {
        border-top: 1px solid var(--border);
        background-color: transparent;
    }

    .login-pf .container {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    #kc-locale {
        position: absolute;
        width: 200px;
        top: 20px;
        right: 20px;
        text-align: right;
        z-index: 9999;
    }
}

.card-pf form.form-actions .btn {
    float: right;
    margin-left: 10px;
}

#kc-form-buttons {
    margin-top: 20px;
}

.login-pf-page .login-pf-brand {
    margin-top: 20px;
    max-width: 360px;
    width: 40%;
}

.select-auth-box-arrow {
    display: flex;
    align-items: center;
    margin-right: 2rem;
    color: var(--primary);
}

.select-auth-box-icon {
    display: flex;
    flex: 0 0 2em;
    justify-content: center;
    margin-right: 1rem;
    margin-left: 3rem;
    color: var(--primary);
}

.select-auth-box-parent {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    padding-bottom: 1rem;
    cursor: pointer;
    text-align: left;
    align-items: unset;
    background-color: unset;
    border-right: unset;
    border-bottom: unset;
    border-left: unset;
}

.select-auth-box-parent:hover {
    background-color: var(--surface);
}

.select-auth-container {
    padding-bottom: 0px !important;
}

.select-auth-box-headline {
    font-size: var(--pf-global--FontSize--md);
    color: var(--primary-hover);
    font-weight: bold;
}

.select-auth-box-desc {
    font-size: var(--pf-global--FontSize--sm);
    color: var(--ink-muted);
}

.select-auth-box-paragraph {
    text-align: center;
    font-size: var(--pf-global--FontSize--md);
    margin-bottom: 5px;
}

.card-pf {
    margin: 0 auto;
    box-shadow: var(--shadow);
    padding: 0 20px;
    max-width: 460px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    border-top: 3px solid var(--button-bg);
    background-color: var(--paper);
}

/*phone*/
@media (max-width: 767px) {
    .login-pf-page .card-pf {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-top: 0;
        box-shadow: none;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .kc-social-grid {
        grid-column-end: 12;
        --pf-l-grid__item--GridColumnEnd: span 12;
    }

    .kc-social-grid .kc-social-icon-text {
        left: -15px;
    }
}

.login-pf-page .login-pf-signup {
    font-size: 15px;
    color: var(--ink-muted);
}

#kc-content-wrapper .row {
    margin-left: 0;
    margin-right: 0;
}

.login-pf-page.login-pf-page-accounts {
    margin-left: auto;
    margin-right: auto;
}

.login-pf-page .btn-primary {
    margin-top: 0;
}

.login-pf-page .list-view-pf .list-group-item {
    border-bottom: 1px solid var(--border);
}

.login-pf-page .list-view-pf-description {
    width: 100%;
}

#kc-form-login div.form-group:last-of-type,
#kc-register-form div.form-group:last-of-type,
#kc-update-profile-form div.form-group:last-of-type,
#kc-update-email-form div.form-group:last-of-type {
    margin-bottom: 0px;
}

.no-bottom-margin {
    margin-bottom: 0;
}

#kc-back {
    margin-top: 5px;
}

/* Recovery codes */
.kc-recovery-codes-warning {
    margin-bottom: 32px;
}

.kc-recovery-codes-warning .pf-c-alert__description p {
    font-size: 0.875rem;
}

.kc-recovery-codes-list {
    list-style: none;
    columns: 2;
    margin: 16px 0;
    padding: 16px 16px 8px 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-md);
}

.kc-recovery-codes-list li {
    margin-bottom: 8px;
    font-size: 11px;
    font-family: monospace;
}

.kc-recovery-codes-list li span {
    color: var(--ink-muted);
    width: 16px;
    text-align: right;
    display: inline-block;
    margin-right: 1px;
}

.kc-recovery-codes-actions {
    margin-bottom: 24px;
}

.kc-recovery-codes-actions button {
    padding-left: 0;
}

.kc-recovery-codes-actions button i {
    margin-right: 8px;
}

.kc-recovery-codes-confirmation {
    align-items: baseline;
    margin-bottom: 16px;
}

#certificate_subjectDN {
    overflow-wrap: break-word
}

/* End Recovery codes */
