/* RogerThat Keycloak Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Navbar ── */

.rt-kc-navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(10, 10, 15, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    display: block !important;
}

.rt-kc-navbar-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 16px 24px !important;
    box-sizing: border-box !important;
}

.rt-kc-brand {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
    background: linear-gradient(to right, #ffffff, #8888a0) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    text-decoration: none !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.rt-kc-brand:hover {
    text-decoration: none !important;
    color: transparent !important;
}

.rt-kc-navbar-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.rt-kc-btn-outline,
.rt-kc-btn-violet,
.rt-kc-btn-amber {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
    transition: all 0.3s ease !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.rt-kc-btn-outline {
    padding: 8px 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: transparent !important;
    color: #f0f0f5 !important;
}

.rt-kc-btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: #1a1a26 !important;
    color: #f0f0f5 !important;
    text-decoration: none !important;
}

.rt-kc-btn-violet {
    padding: 10px 20px !important;
    border: none !important;
    background: #8b5cf6 !important;
    color: #ffffff !important;
}

.rt-kc-btn-violet:hover {
    background: rgba(139, 92, 246, 0.9) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.rt-kc-btn-amber {
    padding: 10px 20px !important;
    border: none !important;
    background: #f59e0b !important;
    color: #0a0a0f !important;
}

.rt-kc-btn-amber:hover {
    background: rgba(245, 158, 11, 0.9) !important;
    color: #0a0a0f !important;
    text-decoration: none !important;
}

.rt-kc-navbar-actions svg {
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* ── Language Picker ── */

.rt-kc-lang-picker {
    position: relative !important;
}

.rt-kc-lang-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    border: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #8888a0 !important;
    font-size: 0.875rem !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.rt-kc-lang-toggle:hover {
    color: #f0f0f5 !important;
    background: #1a1a26 !important;
}

.rt-kc-lang-toggle svg {
    width: 14px !important;
    height: 14px !important;
}

.rt-kc-lang-toggle svg:last-child {
    width: 12px !important;
    height: 12px !important;
    transition: transform 0.2s ease !important;
}

.rt-kc-lang-picker.is-open .rt-kc-lang-toggle svg:last-child {
    transform: rotate(180deg) !important;
}

.rt-kc-lang-current {
    display: none !important;
}

@media (min-width: 640px) {
    .rt-kc-lang-current {
        display: inline !important;
    }
}

.rt-kc-lang-dropdown {
    display: none !important;
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
    margin-top: 8px !important;
    width: 176px !important;
    border-radius: 12px !important;
    background: #12121a !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
    overflow: hidden !important;
    z-index: 50 !important;
}

.rt-kc-lang-picker.is-open .rt-kc-lang-dropdown {
    display: block !important;
}

.rt-kc-lang-option {
    display: block !important;
    width: 100% !important;
    padding: 10px 16px !important;
    border: none !important;
    background: transparent !important;
    text-align: left !important;
    font-size: 0.875rem !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: #8888a0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.rt-kc-lang-option:hover {
    color: #f0f0f5 !important;
    background: #1a1a26 !important;
}

.rt-kc-lang-option.is-active {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #3b82f6 !important;
    font-weight: 500 !important;
}

@media (max-width: 640px) {
    .rt-kc-navbar-actions span {
        display: none !important;
    }
    .rt-kc-btn-outline,
    .rt-kc-btn-violet,
    .rt-kc-btn-amber {
        padding: 8px 12px !important;
    }
}

/* ── Full page reset ── */

html.login-pf,
.login-pf,
.login-pf body,
body {
    background: #0a0a0f !important;
    background-image: none !important;
    color: #f0f0f5 !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
    min-height: 100vh !important;
}

/* Background grid */
.login-pf-page::before,
.login-pf::before {
    content: "" !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) !important;
    background-size: 60px 60px !important;
}

/* Background glow */
.login-pf-page::after,
.login-pf::after {
    content: "" !important;
    position: fixed !important;
    top: -200px !important;
    left: -100px !important;
    width: 600px !important;
    height: 600px !important;
    border-radius: 50% !important;
    filter: blur(120px) !important;
    opacity: 0.25 !important;
    z-index: 0 !important;
    pointer-events: none !important;
    background: #3b82f6 !important;
    animation: rt-glow-float 20s ease-in-out infinite !important;
}

@keyframes rt-glow-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Container ── */

.login-pf .container,
.login-pf .container-fluid {
    position: relative !important;
    z-index: 1 !important;
    padding-top: 40px !important;
}

#kc-container-wrapper {
    position: relative !important;
}

/* ── Hide default header/logo ── */

#kc-header {
    display: none !important;
}

.login-pf-page .login-pf-brand {
    display: none !important;
}

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

/* ── Card ── */

.card-pf {
    background: #12121a !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-top: none !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4) !important;
    padding: 40px 36px 32px !important;
    max-width: 420px !important;
    margin: 0 auto !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Card glow */
.card-pf::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    background: radial-gradient(ellipse at top left, rgba(59, 130, 246, 0.12), transparent 70%) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

.card-pf > * {
    position: relative;
    z-index: 1;
}

/* ── Page title ── */

h1#kc-page-title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
    text-align: center !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
    background: linear-gradient(to bottom right, #ffffff, #8888a0) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ── Labels ── */

.pf-c-form__label,
.pf-c-form__label-text,
label.pf-c-form__label,
label {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: #8888a0 !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ── Inputs ── */

.pf-c-form-control,
input.pf-c-form-control,
input[type="text"],
input[type="password"],
input[type="email"] {
    background: #0a0a0f !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    color: #f0f0f5 !important;
    padding: 12px 16px !important;
    font-size: 0.875rem !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    height: auto !important;
    line-height: 1.4 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.pf-c-form-control:focus,
input.pf-c-form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

.pf-c-form-control::placeholder,
input::placeholder {
    color: rgba(136, 136, 160, 0.5) !important;
}

/* ── Password visibility button ── */

.pf-c-button.pf-m-control {
    background: #0a0a0f !important;
    border: none !important;
    border-radius: 0 12px 12px 0 !important;
    color: #8888a0 !important;
    padding: 12px !important;
    cursor: pointer !important;
}

.pf-c-button.pf-m-control:hover {
    color: #f0f0f5 !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Input group — make input round left, button round right */
.pf-c-input-group {
    display: flex !important;
}

.pf-c-input-group .pf-c-form-control {
    border-radius: 12px 0 0 12px !important;
    border-right: none !important;
}

/* ── Primary button ── */

.pf-c-button.pf-m-primary,
.btn-primary,
input[type="submit"].pf-c-button,
#kc-login {
    background: #3b82f6 !important;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
    padding: 12px 24px !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    width: 100% !important;
    margin-top: 8px !important;
    height: auto !important;
    line-height: 1.4 !important;
}

.pf-c-button.pf-m-primary:hover,
.btn-primary:hover,
#kc-login:hover {
    background: rgba(59, 130, 246, 0.85) !important;
}

/* ── Links ── */

a {
    color: #3b82f6 !important;
    transition: color 0.2s ease !important;
    text-decoration: none !important;
}

a:hover {
    color: rgba(59, 130, 246, 0.8) !important;
    text-decoration: none !important;
}

/* ── Forgot password ── */

#kc-form-options {
    margin-top: 8px !important;
}

#kc-form-options a,
#kc-form-options span {
    font-size: 0.8125rem !important;
    color: #3b82f6 !important;
}

/* ── Checkbox ── */

.pf-c-check__label,
.checkbox label,
#kc-form-options .checkbox {
    color: #8888a0 !important;
    font-size: 0.875rem !important;
}

input[type="checkbox"] {
    accent-color: #3b82f6 !important;
}

/* ── Registration / info ── */

.login-pf-page .login-pf-signup,
#kc-registration {
    color: #8888a0 !important;
    font-size: 0.875rem !important;
    text-align: center !important;
    margin-top: 24px !important;
}

#kc-registration a {
    color: #3b82f6 !important;
    font-weight: 500 !important;
}

#kc-info,
#kc-info-wrapper {
    background: transparent !important;
    color: #8888a0 !important;
    text-align: center !important;
    border: none !important;
    padding: 16px 0 !important;
    margin: 16px 0 0 !important;
}

/* ── Alerts ── */

.pf-c-alert {
    background: rgba(248, 113, 113, 0.1) !important;
    border: 1px solid rgba(248, 113, 113, 0.2) !important;
    border-radius: 12px !important;
    color: #f87171 !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
}

.pf-c-alert.pf-m-success {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    color: #10b981 !important;
}

.pf-c-alert.pf-m-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
    color: #f59e0b !important;
}

.pf-c-alert.pf-m-info {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: #3b82f6 !important;
}

.pf-c-alert__title {
    color: inherit !important;
    font-size: 0.875rem !important;
}

.pf-c-alert__icon {
    color: inherit !important;
}

/* ── Locale selector ── */

#kc-locale {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 9999 !important;
}

#kc-locale-dropdown button,
#kc-locale-dropdown a {
    color: #8888a0 !important;
    font-size: 0.8125rem !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#kc-locale ul {
    background: #12121a !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
}

#kc-locale ul li a {
    color: #8888a0 !important;
    padding: 8px 16px !important;
    display: block !important;
}

#kc-locale ul li a:hover {
    background: #1a1a26 !important;
    color: #f0f0f5 !important;
}

/* ── Form spacing ── */

.form-group,
.pf-c-form__group {
    margin-bottom: 16px !important;
}

#kc-form-buttons {
    margin-top: 24px !important;
}

/* ── Social providers ── */

.kc-social-item,
.pf-c-button.pf-m-control.pf-m-block {
    background: #0a0a0f !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    color: #f0f0f5 !important;
    padding: 12px !important;
}

.kc-social-item:hover,
.pf-c-button.pf-m-control.pf-m-block:hover {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: #1a1a26 !important;
}

.kc-social-section,
.kc-social-gray {
    color: #8888a0 !important;
}

/* ── Scrollbar ── */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(59, 130, 246, 0.24); color: #fff; }

/* ── Mobile ── */

@media (max-width: 767px) {
    .login-pf body,
    body { background: #0a0a0f !important; }
    #kc-header-wrapper { color: transparent !important; font-size: 1rem !important; padding: 16px 10px !important; }
    .card-pf { border-radius: 0 !important; border: none !important; max-width: none !important; box-shadow: none !important; padding: 24px 20px !important; }
    .login-pf .container, .login-pf .container-fluid { padding-top: 16px !important; }
    #kc-info-wrapper { background: transparent !important; }
}

/* Fix white corners on password input group */
.pf-c-input-group {
    background: transparent !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* Center login card vertically */
.login-pf-page,
.login-pf {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

.login-pf .container,
.login-pf .container-fluid {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 0 !important;
}

#kc-container-wrapper {
    width: 100% !important;
}

/* Fix eye icon border */
.pf-c-button.pf-m-control {
    border: none !important;
}

/* Center card vertically — KC26 has .login-pf-page > .card-pf directly */
.login-pf-page {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: calc(100vh - 56px) !important;
    padding: 24px !important;
}

/* Remove all borders from eye toggle — parent group handles containment */
.pf-c-button.pf-m-control,
.pf-c-input-group .pf-c-button.pf-m-control {
    border: none !important;
    outline: none !important;
}
