/* Canobi Keycloak Login Theme
   Colors: Primary #3D8B37, BG #F7F5F0, Text #1C2B1A, Warn #E8952A */

/* Background — override the keycloak.v2 CSS variable + selector */
:root {
    --keycloak-bg-logo-url: url("../img/canobi-bg.png");
}

.login-pf body,
body#keycloak-bg {
    background: url("../img/canobi-bg.png") no-repeat center center fixed !important;
    background-size: cover !important;
}

.login-pf { background: none; }

/* Header with logo */
.canobi-header {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
}

.canobi-logo {
    display: block;
    width: 100px;
    height: auto;
    margin: 0 auto 0.75rem;
}

.canobi-realm-name {
    display: block;
    color: #F7F5F0;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Login card */
.pf-v5-c-login__main {
    background-color: rgba(247, 245, 240, 0.96) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
    max-width: 450px !important;
    margin: 0 auto !important;
    border: none !important;
}

/* Page title */
#kc-page-title {
    color: #1C2B1A !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    text-align: center !important;
}

/* Form labels */
.pf-v5-c-form__label-text,
.pf-v5-c-form__label {
    color: #1C2B1A !important;
    font-weight: 500 !important;
}

/* Inputs */
.pf-v5-c-form-control > input,
.pf-v5-c-form-control > textarea {
    border-color: #6A9B5E !important;
    border-radius: 8px !important;
}

.pf-v5-c-form-control:focus-within {
    --pf-v5-c-form-control--m-expanded--after--BorderBottomColor: #3D8B37;
    border-color: #3D8B37 !important;
    box-shadow: 0 0 0 2px rgba(61, 139, 55, 0.2) !important;
}

/* Primary button */
.pf-v5-c-button.pf-m-primary,
#kc-login {
    background-color: #3D8B37 !important;
    border-color: #3D8B37 !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    width: 100% !important;
}

.pf-v5-c-button.pf-m-primary:hover,
#kc-login:hover {
    background-color: #2E7D32 !important;
    border-color: #2E7D32 !important;
}

/* Links */
a, .pf-v5-c-button.pf-m-link {
    color: #3D8B37 !important;
}

a:hover, .pf-v5-c-button.pf-m-link:hover {
    color: #2E7D32 !important;
}

/* Alerts */
.pf-v5-c-alert.pf-m-danger {
    --pf-v5-c-alert--BackgroundColor: rgba(232, 149, 42, 0.1);
    border-color: #E8952A !important;
    border-radius: 8px !important;
}

/* Footer */
.pf-v5-c-login__main-footer-band {
    background-color: rgba(247, 245, 240, 0.5) !important;
    border-radius: 0 0 12px 12px !important;
}

/* Mobile */
@media (max-width: 768px) {
    .pf-v5-c-login__main {
        margin: 1rem !important;
        border-radius: 12px !important;
    }

    .canobi-logo {
        width: 80px;
    }

    body#keycloak-bg {
        background-color: #F7F5F0 !important;
    }
}
