/* MAINGAU Login Theme CSS - Replaces theme.css */
/* Based on Figma design specifications */

/* CSS Custom Properties for MAINGAU Design System */
@font-face {
    font-family: "RT Rondelle";
    src: url(/static/clients/maingau/RTRondelle-Bold.woff2) format("woff2");
    font-weight: bold;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: "RT Rondelle";
    src: url(/static/clients/maingau/RTRondelle-Regular.woff2) format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap
}

:root {
    /* Colors */
    --maingau-yellow: #FFE500;
    --maingau-blue-dark: #002D67;
    --maingau-blue: #004BAD;
    --fg-primary: #002657;
    --fg-tertiary: #6b84a5;
    --fg-inverse-primary: #f9fcff;
    --fg-active-primary: #0069f1;
    --bg-primary: #ffffff;
    --bg-secondary: #f1f6ff;
    --bg-active-primary: #0069f1;
    --bg-active-tertiary: #f1f6ff;

    /* Shadows */
    --shadow-1: rgba(16, 24, 40, 0.08);
    --shadow-2: rgba(16, 24, 40, 0.03);

    /* Border radius */
    --radius-12: 12px;
    --radius-32: 32px;
    --radius-48: 48px;

    /* Spacing */
    --spacing-8: 8px;
    --spacing-16: 16px;
    --spacing-24: 24px;
    --spacing-32: 32px;

    /* Typography */
    --font-family: "RT Rondelle", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base Styles Override */
* {
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
}

body {
    color: var(--fg-primary);
    font-size: 1.6rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.15px;
    margin: 0;
    font-family: var(--font-family);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-secondary);
}

/* Logo Container */
div.heading object {
    margin-left: auto;
    margin-right: auto;
}

/* Main Container Wrapper */
.card-wrap {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--bg-secondary);
}

/* Main Card Design */
.card-design {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 550px;
    max-width: 100%;
    padding: var(--spacing-32);
    border-radius: var(--radius-32);
    background-color: var(--bg-primary);
    border: none;
    box-shadow:
        0px 12px 16px -4px var(--shadow-1),
        0px 4px 6px -2px var(--shadow-2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-design {
        max-width: 90%;
        padding: var(--spacing-24);
    }
}

@media (max-width: 480px) {
    .card-design {
        max-width: 95%;
        padding: 20px;
        border-radius: var(--spacing-16);
    }
}

/* Form Container */
.form-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Typography Styles */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-weight: 400;
    line-height: 1.5;
    font-family: var(--font-family);
}

h1, .h1 {
    font-weight: 800;
    font-size: 2.4rem;
    line-height: 3.2rem;
    letter-spacing: -0.0046px;
    color: var(--fg-primary);
    text-align: center;
}

h2, .h2 {
    letter-spacing: 0;
}

h3 {
    font-size: 2rem;
    letter-spacing: -0.5px;
    color: var(--fg-primary);
    font-weight: 600;
}

/* Header Styles */
.auth-header {
    text-align: center;
    margin-bottom: 2.4rem;
    align-self: flex-start;
}

/* Form Group Styles */
.form-group {
    margin-bottom: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-group > label {
    display: inline-block;
    margin-bottom: 0.4rem;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.1px;
    color: var(--fg-primary);
    font-family: var(--font-family);
    line-height: 1.6rem;
}

.form-group label strong {
  font-weight: 400;
}

/* Form Control Styles */
.form-control {
    display: block;
    width: 100%;
    height: 48px;
    padding: 1.0rem 1.2rem;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--fg-primary);
    background-color: var(--bg-secondary);
    border: 1px solid var(--fg-tertiary);
    border-radius: var(--radius-12);
    transition: all 0.15s ease-in-out;
    font-family: var(--font-family);
    line-height: 2.4rem;
    letter-spacing: -0.01px;
}

.form-control::placeholder {
    color: var(--fg-primary);
    opacity: 0.7;
}

.form-control:focus {
    outline: none;
    border-color: var(--fg-active-primary);
    background-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(0, 105, 241, 0.1);
}

.form-control:hover {
    border-color: var(--fg-active-primary);
}

.form-control.error {
    border-color: #DC3545;
    background-color: #FFF5F5;
}

/* Button Styles */
.button, .btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.6rem;
    margin: 0;
    height: 48px;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 2.4rem;
    letter-spacing: -0.01px;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    background-color: var(--bg-active-primary);
    border: none;
    border-radius: var(--radius-48);
    color: var(--fg-inverse-primary);
    transition: all 0.15s ease-in-out;
    width: 100%;
    font-family: var(--font-family);
    gap: 0.8rem;
}

.button:hover, .btn:hover {
    background-color: #0052CC;
    transform: translateY(-1px);
}

.button:active, .btn:active {
    transform: translateY(0);
}

.button--primary {
    background-color: var(--bg-active-primary);
    color: var(--fg-inverse-primary);
}

.button--primary:hover {
    background-color: #0052CC;
}

.button:focus, .button:hover {
    text-decoration: none;
    outline: none;
}

/* Button Group Styles */
.button-one-line {
    flex: 1;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    text-align: center;
}

.button-one-line-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

/* Utility Classes */
.pt-md {
    padding-top: 1.6rem;
}

.pt-sm {
    padding-top: 0.8rem;
}

.pl-xs {
    padding-left: 0.4rem;
}

.mt-sm {
    margin-top: 0.8rem;
}

.m-0 {
    margin: 0;
}

/* Link Styles */
.link-wrapper {
    text-align: center;
    margin-top: 1.6rem;
}

a, .link, .btn-link {
    display: inline;
    padding: 0;
    margin: 0;
    font-weight: 400;
    line-height: 2.4rem;
    color: var(--fg-active-primary);
    text-decoration: underline;
    border: none;
    outline: none;
    background-color: inherit;
    vertical-align: baseline;
    font-family: var(--font-family);
    font-size: 1.6rem;
    letter-spacing: -0.01px;
    transition: all 0.15s ease-in-out;
}

a:hover, .link:hover, .btn-link:hover {
    text-decoration: none;
    color: #0052CC;
}

/* Text Styles */
p {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-family: var(--font-family);
}

/* Button Group Styles */
.button-group {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 0 -0.4rem;
    gap: 10px;
}

.button-group > * {
    display: inline-flex;
    flex-shrink: 1;
    width: 100%;
    margin-right: 0.4rem;
    margin-left: 0.4rem;
}

@media (min-width: 576px) {
    .button-group > input {
        width: auto;
    }
}

.mr-sm {
    margin-right: 0.8rem;
}

.button-group .button + .button {
    margin-left: 0.8rem;
}

/* Authorization Form Styles */
.authorize-form-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 486px;
    width: 100%;
}

.authorize-form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.authorize-form-list {
    list-style-position: inside;
    padding-left: 0.8rem;
    margin-top: 0;
    max-height: 30vh;
    overflow-y: auto;
}

.authorize-form-button-group {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    gap: 1.6rem;
}

.authorize-form-button {
    flex-basis: 50%;
}

.button--outlined.button--primary {
    background-color: var(--bg-primary);
    border: 1px solid var(--fg-active-primary);
    color: var(--fg-active-primary);
}

.button--outlined.button--primary:hover {
    background-color: var(--fg-active-primary);
    color: var(--fg-inverse-primary);
}

/* Alert Styles */
.authserver-alert {
    padding: 15px;
    background-color: #FFF5F5;
    color: #DC3545;
    margin-bottom: 15px;
    border-radius: var(--spacing-8);
    border-left: 4px solid #DC3545;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.authserver-alert::before {
    content: "!";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #DC3545;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
}

.authserver-closebtn {
    margin-left: 15px;
    color: #73000A;
    font-weight: bold;
    float: right;
    font-size: 22px;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
}

/* Error Page Styles */
.error-page-wrap {
    height: 100vh;
    display: flex;
    max-width: 80ex;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    justify-content: center;
}

.error-page {
    color: var(--fg-inverse-primary);
    text-align: center;
    margin: 0 1.5rem;
}

.error-page-header {
    font-size: 3.4rem;
    padding-bottom: 1.5rem;
}

.error-page-link {
    padding-top: 1.5rem;
}

/* Spacer */
.spacer {
    display: none;
}

/* Additional styles for MAINGAU branding */
#password-reset a,
#password-reset .btn-link {
  color: rgba(0, 105, 241, 1) !important;
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-underline-offset: 0.6rem;
}

#not-a-customer {
  color: rgba(0, 38, 87, 1) !important;
  text-align: center;
  margin-top: 1.6rem;
}

#not-a-customer a,
#not-a-customer .btn-link {
  color: rgba(0, 105, 241, 1) !important;
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-underline-offset: 0.6rem;
}

.logo {
    height: 24px;
    width: auto;
    margin-bottom: 2.4rem;
}
