/* Wrkzon Keycloak login theme (inherits keycloak.v2) */
:root {
    --wr-primary: #f4511e;
    --wr-primary-dark: #d84315;
    --wr-surface: #fff8f4;
    --wr-border: rgba(244, 81, 30, 0.32);
    --wr-text: #1f2937;
    --wr-muted: #64748b;
}

html,
body,
.login-pf {
    background:
        radial-gradient(circle at 0% 0%, rgba(244, 81, 30, 0.2) 0%, rgba(244, 81, 30, 0) 42%),
        radial-gradient(circle at 100% 100%, rgba(255, 179, 0, 0.2) 0%, rgba(255, 179, 0, 0) 50%),
        linear-gradient(140deg, #fff4ee 0%, #fffdfb 56%, #fff6ef 100%);
    color: var(--wr-text);
}

.pf-v5-c-login {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.pf-v5-c-login__container {
    width: 100%;
    max-width: 34rem;
    margin: 0 auto;
    padding: 8px 12px 12px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.pf-v5-c-login .pf-v5-c-login__container {
    padding-top: max(6px, env(safe-area-inset-top)) !important;
    padding-bottom: clamp(8px, 1.5vh, 16px) !important;
}

.pf-v5-c-login__header,
.pf-v5-c-login__main {
    width: min(100%, 32rem);
    margin-left: auto;
    margin-right: auto;
}

.pf-v5-c-login__header {
    order: 1;
}

.pf-v5-c-login__main {
    order: 2;
}

.pf-v5-c-login__header {
    margin-bottom: 12px;
    padding: 0 4px;
}

.pf-v5-c-login__header,
.pf-v5-c-login__main {
    max-width: 100%;
}

.pf-v5-c-login__header {
    margin-bottom: 4px;
    padding: 0;
}

#kc-page-title {
    color: #0f172a;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.pf-v5-c-login__main-header {
    padding-top: 0.75rem !important;
    padding-bottom: 0.5rem !important;
    min-height: auto !important;
}

.pf-v5-c-login__main-header .pf-v5-c-title,
#kc-page-title {
    margin: 0 !important;
    font-size: clamp(1.55rem, 2.8vw, 2.1rem) !important;
    line-height: 1.15 !important;
}

.pf-v5-c-login__main {
    border: 1px solid var(--wr-border);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fffaf7 100%);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.pf-v5-c-login__main .pf-v5-c-card,
.pf-v5-c-login__main .pf-v5-c-card__body,
.pf-v5-c-login__main-body {
    padding-top: 0.9rem !important;
    padding-bottom: 0.9rem !important;
}

.pf-v5-c-login__main-body {
    margin-top: 0 !important;
}

#kc-form,
#kc-social-providers,
#kc-info-wrapper,
#kc-registration-container {
    margin-top: 0.5rem !important;
}

#kc-social-providers .pf-v5-c-button {
    min-height: 42px;
    padding: 8px 12px;
}

.pf-v5-c-login__main::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #f4511e 0%, #f97316 45%, #d84315 100%);
}

#kc-header-wrapper,
.kc-logo-text {
    color: #8b3c16;
    font-weight: 700;
}

#kc-header-wrapper {
    display: block;
    margin: 0 !important;
    text-align: left;
    letter-spacing: 0.01em;
}

#kc-header-wrapper a {
    color: #8b3c16;
    text-decoration: none;
    font-weight: 700;
}

#kc-header-wrapper a:hover {
    color: #9a3412;
    text-decoration: underline;
}

.pf-v5-c-form-control {
    border-radius: 10px;
    border-color: rgba(15, 23, 42, 0.16);
    background: #ffffff !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

.pf-v5-c-form-control::placeholder {
    color: #94a3b8;
}

.pf-v5-c-input-group .pf-v5-c-form-control,
#username,
#password,
#email,
input[type="text"],
input[type="password"],
input[type="email"] {
    background: #ffffff !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

.pf-v5-c-input-group .pf-v5-c-button.pf-m-control {
    background: #ffffff !important;
    color: #334155 !important;
    border-left: 1px solid rgba(15, 23, 42, 0.14);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #0f172a !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
}

.pf-v5-c-form-control:focus {
    border-color: var(--wr-primary);
    box-shadow: 0 0 0 2px rgba(244, 81, 30, 0.18);
}

#kc-form-options {
    margin-top: 8px;
}

#kc-form-options .pf-v5-c-check__label {
    color: #334155 !important;
    font-weight: 500;
}

#kc-form-options .pf-v5-c-check__input {
    accent-color: #f4511e;
}

.pf-v5-c-button.pf-m-primary,
#kc-login,
#kc-register,
#kc-proceed {
    border-radius: 10px;
    border: 1px solid var(--wr-primary-dark);
    background: linear-gradient(94deg, var(--wr-primary) 0%, #eb5a15 48%, var(--wr-primary-dark) 100%);
    color: #ffffff;
    font-weight: 700;
}

.pf-v5-c-button.pf-m-primary:hover,
#kc-login:hover,
#kc-register:hover,
#kc-proceed:hover {
    background: linear-gradient(94deg, #e64a19 0%, #df5313 48%, #c63f10 100%);
}

#kc-social-providers,
#kc-info-wrapper {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.wr-role-register-panel {
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
}

.wr-role-register-panel span {
    color: var(--wr-muted);
}

.wr-register-variant-banner {
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid rgba(244, 81, 30, 0.22);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 244, 238, 0.96) 100%);
}

.wr-register-variant-kicker {
    color: #9a3412;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.wr-register-variant-hint {
    margin-top: 8px;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.45;
}

.wr-register-switch-block {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    text-align: center;
}

.wr-register-switch-hint,
.wr-register-switch-copy {
    color: var(--wr-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.wr-register-switch-copy {
    margin-top: 8px;
}

.wr-register-switch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    min-width: min(100%, 17rem);
    padding: 0.8rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(244, 81, 30, 0.28);
    background: #fff7f2;
    color: #c2410c;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.wr-register-switch-button:hover {
    background: #fff1e8;
    color: #9a3412;
    box-shadow: 0 10px 20px rgba(244, 81, 30, 0.14);
    transform: translateY(-1px);
}

.wr-register-variant-banner.wr-register-variant-employer {
    border-color: rgba(2, 132, 199, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(239, 248, 255, 0.96) 100%);
}

.wr-register-variant-employer .wr-register-variant-kicker,
.wr-register-variant-employer .wr-register-switch-button {
    color: #0f4c81;
}

.wr-register-variant-employer .wr-register-switch-button {
    border-color: rgba(15, 76, 129, 0.24);
    background: #f3f8ff;
}

.wr-register-variant-employer .wr-register-switch-button:hover {
    background: #eaf3ff;
    box-shadow: 0 10px 20px rgba(15, 76, 129, 0.14);
}

#kc-social-providers h2,
#kc-form-options label,
#kc-info,
#kc-info-wrapper,
.pf-v5-c-form__helper-text {
    color: var(--wr-muted);
}

#kc-social-providers .pf-v5-c-button {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 12px;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: #ffffff;
    text-align: left;
}

#kc-social-providers .pf-v5-c-button:hover {
    border-color: rgba(244, 81, 30, 0.46);
    background: #fff4ee;
}

#kc-social-providers .pf-v5-c-login__main-body {
    display: grid;
    gap: 10px;
}

#kc-social-providers li {
    list-style: none;
    padding-bottom: 0 !important;
}

#kc-social-providers .pf-v5-c-button span {
    margin: 0 !important;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
    text-align: left;
}

#kc-social-providers .pf-v5-c-button svg,
#kc-social-providers .pf-v5-c-button img {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;
}

a,
#kc-registration a,
#kc-current-locale-link {
    color: #c2410c;
}

a:hover,
#kc-registration a:hover,
#kc-current-locale-link:hover {
    color: #9a3412;
}

@media (max-width: 768px) {
    .pf-v5-c-login__main {
        border-radius: 12px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
    }

    .pf-v5-c-login__container {
        padding: 12px;
    }
}

@media (max-height: 840px) {
    .pf-v5-c-login__container {
        padding-top: max(4px, env(safe-area-inset-top)) !important;
        gap: 6px;
    }

    .pf-v5-c-login__header {
        margin-bottom: 2px;
    }

    .pf-v5-c-login__main .pf-v5-c-card,
    .pf-v5-c-login__main .pf-v5-c-card__body,
    .pf-v5-c-login__main-body {
        padding-top: 0.7rem !important;
        padding-bottom: 0.7rem !important;
    }

    .pf-v5-c-login__main-header {
        padding-top: 0.5rem !important;
        padding-bottom: 0.35rem !important;
    }

    .pf-v5-c-login__main-header .pf-v5-c-title,
    #kc-page-title {
        font-size: clamp(1.35rem, 2.2vw, 1.8rem) !important;
        line-height: 1.1 !important;
    }
}

@media (max-height: 760px) {
    .pf-v5-c-login {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .pf-v5-c-login .pf-v5-c-login__container {
        padding-top: 2px !important;
        padding-bottom: 8px !important;
        gap: 4px;
    }

    .pf-v5-c-login__header {
        margin-bottom: 0 !important;
    }

    .pf-v5-c-login__main-header {
        padding-top: 0.35rem !important;
        padding-bottom: 0.2rem !important;
    }

    .pf-v5-c-login__main-header .pf-v5-c-title,
    #kc-page-title {
        font-size: 1.55rem !important;
    }

    .pf-v5-c-login__main .pf-v5-c-card,
    .pf-v5-c-login__main .pf-v5-c-card__body,
    .pf-v5-c-login__main-body {
        padding-top: 0.35rem !important;
        padding-bottom: 0.35rem !important;
    }

    .pf-v5-c-form {
        row-gap: 0.45rem !important;
    }

    .pf-v5-c-form__group {
        margin-bottom: 0.25rem !important;
    }

    #kc-form,
    #kc-social-providers,
    #kc-info-wrapper,
    #kc-registration-container {
        margin-top: 0.28rem !important;
    }

    #kc-social-providers .pf-v5-c-button {
        min-height: 36px;
        padding: 6px 10px;
    }

    .pf-v5-c-button.pf-m-primary,
    #kc-login,
    #kc-register,
    #kc-proceed {
        min-height: 36px;
        padding-top: 0.38rem;
        padding-bottom: 0.38rem;
    }

    #kc-social-providers,
    #kc-info-wrapper {
        border-top-width: 0;
    }
}
