/* ============================================================
   SSO SaintekMu - Custom Theme for Keycloak 26
   Universitas Saintek Muhammadiyah
   ============================================================ */

/* 1. Background halaman login
   ---------------------------------------------------------- */
.login-pf {
    background: none;
}

.login-pf body,
body.login-pf {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 50%, #020611 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* 2. Header & Logo
   ---------------------------------------------------------- */
#kc-header {
    color: #ffffff;
    overflow: visible;
    white-space: nowrap;
}

#kc-header-wrapper {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2em;
    padding: 40px 10px 20px;
    white-space: normal;
    text-align: center;
}

/* Logo sebagai background image */
div.kc-logo-text {
    background-image: url(../img/logo-saintekmu.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    height: 120px;
    width: 400px;
    max-width: 90vw;
    margin: 0 auto 10px auto;
}

/* Sembunyikan teks default */
div.kc-logo-text span {
    display: none;
}

/* 3. Card Login
   ---------------------------------------------------------- */
.card-pf {
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    padding: 30px 30px 20px 30px;
    max-width: 480px;
    border-top: 4px solid #1e5799;
    border-radius: 8px;
    background: #ffffff;
}

/* Judul halaman */
h1#kc-page-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* 4. Form Elements
   ---------------------------------------------------------- */
.login-pf-page .form-group label,
.pf-c-form__label-text {
    font-weight: 500;
    color: #374151;
}

/* Input fields */
.pf-c-form-control {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pf-c-form-control:focus {
    border-color: #1e5799;
    box-shadow: 0 0 0 3px rgba(30, 87, 153, 0.15);
    outline: none;
}

/* 5. Buttons
   ---------------------------------------------------------- */
.pf-c-button.pf-m-primary,
#kc-login,
.btn-primary {
    background-color: #1e5799 !important;
    border-color: #1e5799 !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 20px;
    transition: background-color 0.2s, transform 0.1s;
}

.pf-c-button.pf-m-primary:hover,
#kc-login:hover,
.btn-primary:hover {
    background-color: #164272 !important;
    border-color: #164272 !important;
    transform: translateY(-1px);
}

.pf-c-button.pf-m-primary:active,
#kc-login:active,
.btn-primary:active {
    transform: translateY(0);
}

/* 6. Links
   ---------------------------------------------------------- */
#kc-form-options a,
#kc-registration a,
.login-pf a {
    color: #1e5799;
    text-decoration: none;
}

#kc-form-options a:hover,
#kc-registration a:hover,
.login-pf a:hover {
    color: #164272;
    text-decoration: underline;
}

/* 7. Registration & Info Area
   ---------------------------------------------------------- */
#kc-registration {
    margin-top: 15px;
    text-align: center;
}

.login-pf-signup {
    font-size: 14px;
    color: #6b7280;
}

#kc-info-wrapper {
    font-size: 13px;
    padding: 15px 20px;
    background-color: #f3f4f6;
    border-radius: 0 0 8px 8px;
    margin: 20px -30px -20px -30px;
}

/* 8. Alerts & Messages
   ---------------------------------------------------------- */
.pf-c-alert {
    border-radius: 6px;
    margin-bottom: 15px;
}

.pf-c-alert.pf-m-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
}

.pf-c-alert.pf-m-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

.pf-c-alert.pf-m-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
}

.pf-c-alert.pf-m-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

/* 9. Social Login Buttons
   ---------------------------------------------------------- */
.kc-social-links {
    margin-top: 20px;
}

.kc-social-section hr {
    margin: 20px 0;
    border-color: #e5e7eb;
}

.kc-social-item {
    border-radius: 6px;
    margin-bottom: 10px;
}

/* 10. Locale Dropdown
   ---------------------------------------------------------- */
#kc-locale ul {
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#kc-locale-dropdown button,
#kc-locale-dropdown a {
    color: #ffffff;
}

/* 11. Checkbox & Remember Me
   ---------------------------------------------------------- */
.pf-c-check__label {
    color: #374151;
    font-size: 14px;
}

#kc-form-options .checkbox {
    color: #6b7280;
}

/* 12. Password Visibility Toggle
   ---------------------------------------------------------- */
.pf-c-button.pf-m-control {
    border-color: #d1d5db;
    border-radius: 0 6px 6px 0;
}

/* 13. Responsive Design
   ---------------------------------------------------------- */
@media (max-width: 767px) {
    .login-pf body,
    body.login-pf {
        background: #ffffff;
    }

    #kc-header {
        padding: 15px;
        text-align: center;
    }

    #kc-header-wrapper {
        font-size: 18px;
        padding: 20px 10px;
        color: #1e3a5f;
        letter-spacing: 1px;
    }

    div.kc-logo-text {
        width: 280px;
        height: 85px;
        margin: 0 auto;
    }

    .card-pf {
        max-width: none;
        margin: 0;
        padding: 20px 15px;
        border-top: 0;
        box-shadow: none;
        border-radius: 0;
    }

    #kc-info-wrapper {
        margin: 20px -15px -20px -15px;
        border-radius: 0;
    }

    #kc-locale {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    #kc-locale-dropdown button,
    #kc-locale-dropdown a {
        color: #1e3a5f;
    }
}

@media (min-width: 768px) {
    .login-pf .container {
        padding-top: 50px;
    }

    #kc-locale {
        position: relative;
        text-align: right;
        z-index: 9999;
    }
}

/* 14. Accessibility
   ---------------------------------------------------------- */
.pf-c-form-control:focus-visible {
    outline: 2px solid #1e5799;
    outline-offset: 2px;
}

/* 15. Loading State
   ---------------------------------------------------------- */
.pf-c-button.pf-m-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
