<#-- Reset the Keycloak wrappers -->
<#-- These IDs are standard in the base template.ftl -->
#kc-header, #kc-content, #kc-content-wrapper, #kc-info {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}
.login-pf body {
    background: #e5e5e5 !important;
}
body {
    margin: 0;
    background-color: #e5e5e5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Arial',
    sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.min-w-320px {
    min-width: 320px;
}

.w-350px {
    width: 350px;
}

.bg-atm-bg-100 {
    background-color: #ffffff;
}

.border-atm-border-100 {
    border: 1px solid #d4d4d4;
}

.text-atm-text-primary {
    color: #0a0a0a;
    font-weight: 600;
}

.text-atm-text-secondary {
    color: #404040;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.btn-accent {
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
    display: block;      /* Forces it to take full width of the parent div */
    text-align: center;  /* Centers the text inside the button */
    width: 100%;
    text-decoration: none;
}

.btn-accent:hover:not(:disabled),
.btn-accent:focus {
    background-color: #1e40af;
    color: white !important;
    text-decoration: none !important;
}

.btn-accent:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-link {
    color: #2563eb;
    text-decoration: none;
}

.login-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

.a-noaa-technology {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    /* This ensures the card is perfectly centered in the viewport */
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #e5e5e5;
    z-index: 1000;
}

.login-card {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid #d4d4d4;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    /* Prevent card from being too tall on small screens */
    max-height: 95vh;
    overflow-y: unset;
}

.title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.help-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    text-align: center;
}

/* ========================================================= */
/* SAML Redirect Page Overrides                              */
/* Aligns the transient POST form with the main login dialog */
/* ========================================================= */

/* Replicate .login-page-container layout on the PatternFly page wrapper */
body[data-page-id="login-saml-post-form"] .login-pf-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #e5e5e5;
    z-index: 1000;
}

/* Hide the default Keycloak header since we are moving branding inside the card */
body[data-page-id="login-saml-post-form"] #kc-header {
    display: none !important;
}

/* Turn the h1 into a flex container */
body[data-page-id="login-saml-post-form"] #kc-page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* Hides "Authentication Redirect" */
    margin: 0 0 0.5rem 0;
}

/* Create "NWS" and attach the SVG logo to its right edge */
body[data-page-id="login-saml-post-form"] #kc-page-title::before {
    content: "NWS";
    font-size: 1.5rem;
    color: #0a0a0a;
    font-weight: 600;

    /* 1st Gap: Creates 0.5rem space between the logo and "Connect" */
    margin-right: 0.5rem;

    /* 2nd Gap: Creates 2rem space for the logo + 0.5rem space between "NWS" and the logo */
    padding-right: 2.5rem;

    /* Aligns the 2rem logo to the absolute right edge of the padding */
    background: url("../img/nws-connect-logo.svg") no-repeat right center;
    background-size: 2rem 2rem;

    display: inline-flex;
    align-items: center;
    min-height: 2rem;
}

/* Create "Connect" text */
body[data-page-id="login-saml-post-form"] #kc-page-title::after {
    content: "Connect";
    font-size: 1.5rem;
    color: #0a0a0a;
    font-weight: 600;
}