/* Maalka Theme - Government/Professional Style */

/* Background with subtle pattern */
.login-pf {
    background: #1c83ec !important;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif !important;
    min-height: 100vh;
}

.login-pf body {
    background: none;
    height: 100%;
}

.login-pf-page {
    padding: 0 !important;
}

/* Two-column layout */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left column with logo and splash - 40% width */
.login-left-column {
    flex: 0 0 40%;
    width: 40%;
    background: #005ea2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.logo-splash-container {
    text-align: center;
    width: 100%;
}

.maalka-logo {
    display: block;
    width: 80%;
    height: auto;
    margin: 0 auto 2rem;
}

.maalka-banner {
    display: block;
    width: 90%;
    max-width: 90%;
    height: auto;
    margin: 0 auto;
}

/* Right column with form - 60% width */
.login-right-column {
    flex: 0 0 60%;
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 2rem;
    min-height: 100vh;
}

/* Professional card - target multiple possible selectors */
.card-pf,
.login-right-column .card-pf,
.login-pf .card-pf,
#kc-content,
.login-right-column > div {
    background: white !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    padding: 2.5rem !important;
    max-width: 420px !important;
    width: 100% !important;
}

/* Logo area */
.login-pf-brand {
    text-align: center !important;
    margin-bottom: 2.5rem !important;
}

.login-pf-brand img {
    max-height: 60px !important;
    width: auto !important;
}

/* Professional title */
.login-pf-header h1 {
    color: #212529 !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin-bottom: 2rem !important;
    letter-spacing: -0.025em !important;
}

/* Subtitle/description */
.login-pf-header p {
    color: #6c757d !important;
    font-size: 0.95rem !important;
    text-align: center !important;
    margin-bottom: 2rem !important;
    line-height: 1.5 !important;
}

/* Form styling */
.form-group {
    margin-bottom: 1.25rem !important;
}

.control-label {
    color: #495057 !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
}

.form-control {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid #e9ecef !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    background: white !important;
}

.form-control:focus {
    outline: none !important;
    border-color: #005ea2 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 94, 162, 0.15) !important;
    background: #fafbfc !important;
}

/* Primary button - Maalka Blue */
.btn-primary, #kc-login {
    background: #005ea2 !important;
    border: 2px solid #005ea2 !important;
    border-radius: 4px !important;
    padding: 0.875rem 1.5rem !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    color: white !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.btn-primary:hover, #kc-login:hover {
    background: #0050d8 !important;
    border-color: #0050d8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 94, 162, 0.2) !important;
}

.btn-primary:focus, #kc-login:focus {
    background: #003d7a !important;
    border-color: #003d7a !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 94, 162, 0.25) !important;
}

.btn-primary:active, #kc-login:active {
    transform: translateY(0) !important;
}

/* Secondary button */
.btn-default, .btn-secondary {
    background: white !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 4px !important;
    padding: 0.75rem 1.25rem !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    color: #495057 !important;
    transition: all 0.2s ease !important;
}

.btn-default:hover, .btn-secondary:hover {
    background: #f8f9fa !important;
    border-color: #adb5bd !important;
    color: #212529 !important;
}

/* Remember me checkbox */
.checkbox label {
    font-weight: 500 !important;
    color: #495057 !important;
    font-size: 0.925rem !important;
}

/* Links */
a {
    color: #005ea2 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.15s ease !important;
}

a:hover {
    color: #0050d8 !important;
    text-decoration: underline !important;
}

/* Registration link */
.login-pf-signup {
    text-align: center !important;
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid #e9ecef !important;
}

.login-pf-signup span {
    color: #6c757d !important;
    font-size: 0.925rem !important;
}

/* Error messages */
.alert-error {
    background: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    color: #721c24 !important;
    border-radius: 4px !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.25rem !important;
    font-size: 0.925rem !important;
    font-weight: 500 !important;
}

/* Success messages */
.alert-success {
    background: #d4edda !important;
    border: 1px solid #c3e6cb !important;
    color: #155724 !important;
    border-radius: 4px !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.25rem !important;
    font-size: 0.925rem !important;
    font-weight: 500 !important;
}

/* Info messages */
.alert-info {
    background: #d1ecf1 !important;
    border: 1px solid #bee5eb !important;
    color: #0c5460 !important;
    border-radius: 4px !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.25rem !important;
    font-size: 0.925rem !important;
    font-weight: 500 !important;
}

/* Warning messages */
.alert-warning {
    background: #fff3cd !important;
    border: 1px solid #ffeeba !important;
    color: #856404 !important;
    border-radius: 4px !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.25rem !important;
    font-size: 0.925rem !important;
    font-weight: 500 !important;
}

/* Footer */
.login-pf-page-footer {
    text-align: center !important;
    margin-top: 3rem !important;
    padding: 1rem !important;
    color: #6c757d !important;
    font-size: 0.875rem !important;
}

/* Responsive - Tablet and Mobile */
@media (max-width: 1024px) {
    /* Stack columns vertically for banner layout */
    .login-container {
        flex-direction: column;
    }

    .login-left-column {
        flex: 1 1 auto;
        width: 100%;
        min-height: 150px;
        max-height: 10vh;
        padding: 0;
        position: relative;
        overflow: hidden;
    }

    .logo-splash-container {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        position: relative;
        box-sizing: border-box;
    }
    .logo-splash-container > img {
        width: 300px;
    }

    .maalka-banner {
        position: absolute;
        /*left: 0;*/
        top: 50%;
        transform: translateY(-50%);
        width: auto;
        height: 600%;
        max-height: none;
        opacity: 0.3;
        object-fit: contain;
    }

    .maalka-logo {
        position: relative;
        z-index: 10;
        width: auto;
        height: 50%;
        max-height: 120px;
        object-fit: contain;
        margin: 0;
    }

    .login-right-column {
        flex: 1 1 auto;
        width: 100%;
        min-height: auto;
        padding: 1.5rem;
    }

    .card-pf,
    .login-right-column .card-pf,
    .login-pf .card-pf,
    #kc-content,
    .login-right-column > div {
        margin: 0 auto !important;
        padding: 2rem 1.5rem !important;
        max-width: 500px !important;
        width: 100% !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
        border-radius: 8px !important;
    }

    .login-pf-header h1 {
        font-size: 1.5rem !important;
    }

    .btn-primary, #kc-login {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .login-left-column {
        min-height: 200px;
        max-height: 30vh;
        padding: 0;
    }
    .login-right-column {
        padding: 1rem;
    }

    .card-pf,
    .login-right-column .card-pf,
    .login-pf .card-pf,
    #kc-content,
    .login-right-column > div {
        padding: 1.5rem 1rem !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .login-pf-header h1 {
        font-size: 1.25rem !important;
        margin-bottom: 1.5rem !important;
    }

    .form-control {
        padding: 0.65rem 0.75rem !important;
        font-size: 0.95rem !important;
    }

    .btn-primary, #kc-login {
        padding: 0.65rem 0.875rem !important;
        font-size: 0.9rem !important;
    }
}

/* Hide default Keycloak branding */
.login-pf-brand img[src*="keycloak"] {
    display: none !important;
}

/* Hide the header since we're showing logo in left column */
#kc-header, #kc-header-wrapper {
    display: none;
}

/* Additional Maalka-specific styling */
.login-pf-social-section {
    border-top: 2px solid #e9ecef !important;
    margin-top: 2rem !important;
    padding-top: 2rem !important;
}

.login-pf-social-link {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0.75rem !important;
    padding: 0.75rem !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 4px !important;
    text-align: center !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.login-pf-social-link:hover {
    background: #f8f9fa !important;
    border-color: #adb5bd !important;
}
