.pf-v5-c-login__main {
    border-radius: 2rem;
}

.pf-v5-c-input-group, .pf-v5-c-form-control {
    background: #FDEBED;
    border-radius: var(--planop-border-radius);
    border: none;
}

.pf-v5-c-form-control > input:focus-visible {
    border-radius: var(--planop-border-radius);
}

.pf-v5-c-form-control::before {
    content: none;
}

.pf-v5-c-form-control::after {
    content: none;
}

.pf-v5-c-button.pf-m-control {
    background: transparent;
}

.pf-v5-c-button.pf-m-control::after {
    content: none;
}


.pf-v5-c-button.pf-m-primary {
    background-color: var(--color-local);
    color: white;
    border: 1px solid var(--color-local);
}

.pf-v5-c-button.pf-m-secondary {
    background-color: white;
    color: var(--color-local);
    border: 1px solid var(--color-local);
}


.pf-v5-c-button.pf-m-primary:hover,
.pf-v5-c-button.pf-m-secondary:hover {
    --hover-color: color-mix(in srgb, var(--color-local) 85%, black);
    background-color: var(--hover-color);
    color: white;
    border: 1px solid var(--hover-color);
}

.pf-v5-c-button.pf-m-primary:active,
.pf-v5-c-button.pf-m-secondary:active {
    --active-color: color-mix(in srgb, var(--color-local) 70%, black);
    background-color: var(--active-color);
    color: white;
    border: 1px solid var(--active-color);
}

.pf-v5-c-button.pf-m-primary::after,
.pf-v5-c-button.pf-m-secondary::after {
    border: none;
}

.pf-v5-c-button.pf-m-primary {
    --color-local: var(--planop-parma);
}

.pf-v5-c-button.pf-m-secondary {
    --color-local: var(--planop-red);
}

.pf-v5-c-button {
    border-radius: var(--planop-border-radius);
}

:root {
    --planop-bg-image-url: url("../img/platform_v4_bg.svg");
    --planop-red: #F5333F;
    --planop-dark-blue: #061A40;
    --planop-pink: #FDEBED;
    --planop-parma: #A6A6FF;
    --planop-blue: #0074C2;
    --planop-border-radius: 2rem;
}

.pf-v5-c-login__container {
    grid-template-columns: 34rem;
    grid-template-areas: "header"
        "main"
}

.login-pf body {
    background: var(--planop-bg-image-url) no-repeat left center fixed;
    background-size: contain;
    height: 100%;
}


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

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

.kc-login-tooltip .kc-tooltip-text {
    top: -3px;
    left: 160%;
    background-color: black;
    visibility: hidden;
    color: #fff;

    min-width: 130px;
    text-align: center;
    border-radius: 2px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
    padding: 5px;

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

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

/* 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 black transparent transparent;
}

#reset-login {
    display: none;
}

#kc-recovery-codes-list {
    columns: 2;
}

#certificate_subjectDN {
    overflow-wrap: break-word
}

#kc-header-wrapper {
    display: none;
}

hr {
    margin-top: var(--pf-v5-global--spacer--sm);
    margin-bottom: var(--pf-v5-global--spacer--md);
}

@media (min-width: 768px) {
    div.pf-v5-c-login__main-header {
        grid-template-columns: 70% 30%;
    }
}

/* Required field marker */
.kc-required {
    color: var(--planop-red);
    margin-left: 2px;
}

/* Country select — full width, same look as inputs */
.kc-country-select {
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23061A40' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Newsletter notice below country dropdown (AC04) */
.kc-newsletter-notice {
    font-size: 0.85rem;
    color: var(--planop-dark-blue);
    margin-top: 0.5rem;
    background: var(--planop-pink);
    padding: 0.5rem 0.75rem;
    border-radius: var(--planop-border-radius);
    line-height: 1.5;
}

.kc-newsletter-notice a {
    color: var(--planop-blue);
    font-weight: 600;
    text-decoration: underline;
}

.kc-newsletter-notice a:hover {
    color: var(--planop-dark-blue);
}

/* Password requirements checklist (AC07) */
.kc-password-requirements {
    list-style: none;
    padding: 0.5rem 0.75rem;
    margin: 0.4rem 0 0;
    background: var(--planop-pink);
    border-radius: var(--planop-border-radius);
    font-size: 0.82rem;
}

.kc-req {
    padding: 2px 0;
    padding-left: 1.4rem;
    position: relative;
}

.kc-req::before {
    content: "✗";
    position: absolute;
    left: 0.2rem;
    font-weight: bold;
}

.kc-req--met::before {
    content: "✓";
    color: #2e7d32;
}

.kc-req--unmet::before {
    color: var(--planop-red);
}

.kc-req--met {
    color: #2e7d32;
}

.kc-req--unmet {
    color: var(--planop-red);
}

/* Terms checkbox row (AC02 checkbox) */
.kc-terms-group {
    display: flex;
    align-items: flex-start;
}

.kc-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1.4;
}

.kc-terms-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--planop-parma);
    width: 1rem;
    height: 1rem;
}

.kc-terms-label a {
    color: var(--planop-blue);
    text-decoration: underline;
}

/* Register button — disabled state */
#kc-register-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Hidden utility class (used by JS validation) */
.kc-hidden {
    display: none !important;
}

/* reCAPTCHA widget row — overflow clips the iframe, which PatternFly's
   :where(iframe){height:auto} reset blows up to 150px inside Google's 78px box */
.kc-captcha-group {
    display: flex;
    justify-content: center;
    overflow: hidden;
}

/* Submit button — centered and full width like sign-in */
.kc-submit-group {
    display: flex;
    justify-content: center;
}

.grecaptcha-badge {
    right: 14px !important;
    z-index: 10;
}

.grecaptcha-badge iframe {
    height: 60px;
    max-width: none;
    display: block;
}

.kc-submit-btn {
    width: 100%;
}

/* Back to login link */
.kc-back-to-login {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.kc-back-to-login a {
    color: var(--planop-blue);
    text-decoration: underline;
}

/* Verify email screen */
.kc-verify-email-intro {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.kc-verify-email-note {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.kc-verify-email-actions {
    margin-bottom: 1rem;
}

/* Error page container */
.kc-error-container {
    text-align: center;
}

.kc-error-message {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Password field wrapper with eye toggle */
.kc-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.kc-password-wrapper .pf-v5-c-form-control {
    width: 100%;
    padding-right: 2.8rem;
}

.kc-eye-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: var(--planop-dark-blue);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.kc-eye-btn:hover {
    opacity: 1;
}

/* Inline group: institution + country on the same line */
.kc-inline-group {
    display: flex;
    gap: 1rem;
}

.kc-inline-group .kc-inline-field {
    flex: 1;
    min-width: 0;
}

.kc-newsletter-notice {
    border-left: 3px solid #D85A30;
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
}

.kc-newsletter-notice__title {
    font-weight: 600;
    font-size: 15px;
    color: #4A1B0C;
    margin: 0 0 6px;
}

.kc-newsletter-notice__body {
    font-size: 14px;
    color: #712B13;
    margin: 0;
    line-height: 1.6;
}

.kc-newsletter-notice a {
    color: #185FA5;
    text-decoration: underline;
}

.kc-verify-email-wrapper {
    text-align: center;
    padding: 0.5rem 0;
}

.kc-verify-email-sent {
    font-size: 1rem;
    color: var(--planop-dark-blue);
    margin: 0 0 0.25rem;
}

.kc-verify-email-address {
    font-size: 1rem;
    color: var(--planop-red);
    margin: 0 0 0.75rem;
}

.kc-verify-email-click {
    font-size: 1rem;
    color: var(--planop-dark-blue);
    margin: 0 0 1.25rem;
}

.kc-verify-email-expiry {
    background: var(--planop-pink);
    border-radius: 0;
    padding: 0.65rem 1.25rem;
    margin: 0 0 1.5rem;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.kc-verify-email-expiry span {
    font-size: 0.9rem;
    font-style: italic;
    color: #712B13;
}

.kc-verify-email-no-email {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 0.75rem;
}

.kc-verify-email-actions {
    display: flex;
    justify-content: center;
}
/* ── Resend verification email spacing ── */
#resend-fields .pf-v5-c-form__group:first-child {
    margin-bottom: 20px;
}

/* ── Resend verification email success message ── */
.kc-resend-success {
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.kc-resend-success-text {
    color: #16a34a;
    font-weight: 600;
    margin: 0;
    font-size: 0.95rem;
}
/* ── Email verified success page ── */
.kc-email-verified-container {
    text-align: center;
    padding: 1rem 0;
}
.kc-email-verified-icon {
    font-size: 3rem;
    color: #16a34a;
    margin-bottom: 1rem;
}
.kc-email-verified-message {
    font-size: 1rem;
    color: #111827;
    margin-bottom: 0.5rem;
}
.kc-email-verified-redirect {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* ── Email OTP verification screen ── */
.kc-email-otp-instruction {
    text-align: center;
    font-size: 1rem;
    color: var(--planop-dark-blue);
    margin: 0 0 0.25rem;
}

.kc-email-otp-address {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--planop-red);
    margin: 0 0 1.25rem;
}

.kc-email-otp-boxes {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.kc-email-otp-box {
    width: 2.5rem;
    height: 2.75rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--planop-pink);
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--planop-dark-blue);
}

.kc-email-otp-box:focus {
    border-color: var(--planop-red);
    outline: none;
}

.kc-email-otp-hint {
    text-align: center;
    font-size: 0.85rem;
    font-style: italic;
    color: #666;
    margin: 0 0 1.25rem;
}

.kc-email-otp-resend {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 1rem;
}

.kc-email-otp-resend-btn {
    background: none;
    border: none;
    color: var(--planop-red);
    font-weight: 600;
    cursor: pointer;
    padding: 0 0.25rem;
}

.kc-email-otp-resend-btn:disabled {
    color: #999;
    cursor: default;
}

.kc-email-otp-resend-timer {
    color: #999;
}