@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,700;1,300&family=Sarabun:ital,wght@0,300;0,400;0,500;0,700;1,300&display=swap');

/* Aggressive Background Reset */
html,
body,
.login-pf-page {
    /* Use DLD Background Image */
    background-image: url('../img/bg-keycloak.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-color: #ffffff;
    /* Fallback */

    height: 100vh;
    font-family: 'Sarabun', 'Prompt', sans-serif !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Force vertical stacking for form groups */
.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
    width: 100%;
}

.pf-c-form__label-text {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

/* Container for the login card */
.login-pf-page .card-pf {
    /* Stronger Shadow */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 12px;
    padding: 50px;
    background: #ffffff;

    /* Increased Width to 900px */
    max-width: 700px;
    width: 100%;

    position: relative;
    border-top: 6px solid #006F3D;
    /* DLD Green (User choice) */
    margin: 0 auto;
}

/* Header/Logo Area */
.login-pf-page .login-pf-header {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo Image */
.login-pf-page .login-pf-brand {
    height: 110px;
    width: 110px;
    margin-bottom: 10px;
    border-radius: 50%;
    object-fit: contain;
}

/* DLD Text below logo */
#kc-header-wrapper {
    font-family: 'Prompt', sans-serif;
    font-size: 35px;
    font-weight: 600;
    color: #006F3D;
    /* DLD Green (User choice) */
    letter-spacing: 0.2px;
    margin-top: 15px;
    text-transform: uppercase;
    text-shadow: #005a32 1px 1px 2px;
}

/* Page Title */
.login-pf-page h1 {
    font-family: 'Sarabun', sans-serif;
    color: #444;
    font-weight: 600;
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
    white-space: nowrap;
    /* Prevent wrapping */
}

/* Form Controls */
.pf-c-form-control,
.form-control {
    border-radius: 6px;
    border: 1px solid #c9c9c9;
    background-color: #eef2f7;
    /* Light blue input bg */
    padding: 12px 15px;
    height: 50px;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.pf-c-form-control:focus,
.form-control:focus {
    background-color: #fff;
    border-color: #006F3D;
    /* DLD Green (User choice) */
    box-shadow: 0 0 0 2px rgba(0, 111, 61, 0.1);
}

/* Primary Button (Signin) - DEEP GREEN */
.pf-c-button.pf-m-primary,
.btn-primary {
    background-color: #006F3D !important;
    /* DLD Green */
    background-image: none !important;
    border: none;
    border-radius: 8px;
    padding: 14px 0;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 18px;
    width: 100%;
    color: #fff;
    margin-top: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 111, 61, 0.2);
}

.pf-c-button.pf-m-primary:hover,
.btn-primary:hover {
    background-color: #005a32 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 111, 61, 0.3);
}

/* Links */
.login-pf-page .login-pf-signup a,
.login-pf-page .login-pf-settings a {
    color: #039be5;
    font-weight: 500;
    text-decoration: none;
}

.login-pf-page .login-pf-signup a:hover,
.login-pf-page .login-pf-settings a:hover {
    text-decoration: underline;
}

/* Footer / Register Area */
.login-pf-signup {
    margin-top: 30px;
    padding: 20px;
    background-color: #f7f7f7;
    text-align: center;
    font-size: 14px;
    color: #666;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    margin-left: -50px;
    /* Match card padding */
    margin-right: -50px;
    margin-bottom: -50px;
    width: calc(100% + 100px);
}

/* Checkbox */
.checkbox label {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.checkbox input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 0;
}

/* Hide Reset Flow Icon */
.pficon-arrow {
    display: none;
}

/* Social Providers Section */
#kc-social-providers {
    margin-top: 10px;
}

.kc-social-divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 14px;
}

.kc-social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ThaID Identity Provider Button */
.btn-thaid {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    background-color: #1a0a5e;
    color: #fff !important;
    border: none;
    border-radius: 50px;
    font-family: 'Sarabun', 'Prompt', sans-serif;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-thaid:hover {
    background-color: #120842;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(24, 10, 87, 0.3);
    text-decoration: none;
    color: #fff !important;
}

/* Other Social Provider Buttons */
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    background-color: #f5f5f5;
    color: #333 !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Sarabun', 'Prompt', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 10px;
}

.btn-social:hover {
    background-color: #e8e8e8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #333 !important;
}