﻿@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter_Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter_SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter_Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-inter: 'Inter', sans-serif;
    --fw-regular: 400;
    --fw-semibold: 600;
    --fw-bold: 700;
    --font-color: #111217;
    --bg-grad-start: #013367;
    --bg-grad-end: #044A8F;
    --surface: #FFFFFF;
    --surface-hover: #ECECED;
    --text: #111217;
    --muted-text: #111217;
    --border: #11121729;
    --divider: rgba(17, 18, 23, 0.16);
    --input-bg: #FFFFFF;
    --button-bg: #0475D7;
    --button-hover: #056DC8;
    --button-disabled-bg: #11121729;
    --error: #D32C22;
    --password-toggle-bg: #666;
    --password-toggle-bg-hover: #000;
    --blue-200: #7dc0fd
}

@media (prefers-color-scheme: dark) {
    :root {
        --surface: #36393F;
        --font-color: #F5F5F5;
        --input-bg: #36393F;
        --muted-text: #F5F5F5;
        --border: #EFF1F629;
        --text: #FFFFFF;
        --password-toggle-bg: #b3b3b3;
        --password-toggle-bg-hover: #F5F5F5;
        --divider: rgba(239, 241, 246, 0.16);
        --surface-hover: #5C6169;
    }
}

* {
    font-family: var(--font-inter);
}

body {
    background: linear-gradient(116.82deg, #EDEDED 0%, #E0E2E4 56%, #D4D8DB 100%);
    height: 100vh;
    margin: 0;
    font-weight: var(--fw-regular);
    display: flex;
    flex-direction: column;
    color: var(--text);
}

a {
    text-decoration: none;
}

.logo {
    margin: 2.5rem;
    width: 12rem;
    align-self: flex-start;
}

.main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: var(--surface);
    padding: 2.5rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 525px;
    display: flex;
    flex-direction: column;
    text-align: center;
    overflow-wrap: break-word;
    color: var(--text);
}

.language-select {
    margin-bottom: 10px;
    display: flex;
    justify-content: flex-end;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin: 0 5px;
    padding: 0;
    color: var(--text-color);
} 

.row {
    color: var(--font-color);
    font-style: normal;
    font-weight: var(--fw-bold);
    font-size: 1.75rem;
    font-feature-settings: 'tnum' on, 'lnum' on;
    margin-bottom: 1rem;
}

form {
    margin-top: 1rem;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%;
}

    .form-group input {
        width: 100%;
        box-sizing: border-box;
        padding: 1rem;
        font-size: 1rem;
        border: 1px solid var(--border);
        border-radius: 0.5rem;
        background: var(--input-bg);
        color: var(--text);
        outline: none;
        caret-color: var(--text);
    }

.form-group label {
    position: absolute;
    top: 0.9rem;
    left: 1rem;
    background: var(--surface);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    pointer-events: none;
    padding: 4px;
    padding-right: 4px;
    color: var(--muted-text);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: -0.75rem;
    left: 0.8rem;
    font-size: 0.75rem;
}

    .form-group.has-value label {
        top: -0.75rem;
        left: 0.8rem;
        font-size: 0.75rem;
    }

    /* Label auch bei Autofill (Chrome/Safari) hochschieben */
    .form-group input:-webkit-autofill + label {
        top: -0.75rem;
        left: 0.8rem;
        font-size: 0.75rem;
    }

    .form-group input:-webkit-autofill {
        -webkit-text-fill-color: var(--text) !important;
        -webkit-box-shadow: 0 0 0px 1000px var(--input-bg) inset; 
        font-family: var(--font-inter) !important; 
        font-size: 1rem !important; 
        font-weight: var(--fw-regular) !important;
        transition: background-color 9999s ease-out 0s;
    }

/* Eingebautes Edge/IE-Reveal-Icon ausblenden */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

.password-field input {
    padding-right: 2rem; 
}

.button {
    font-weight: var(--fw-semibold);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1rem;
    padding: 0.6rem;
    background: var(--button-bg);
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 14px;
    height: 2.4rem;
}

.button:hover {
    background: var(--button-hover);
}

.button[disabled] {
    cursor: not-allowed;
    color: var(--muted-text);
    background: var(--button-disabled-bg);
}

.separator {
    display: flex;
    margin-bottom: 2rem;
    margin-top: 1rem;
    flex-direction: row;
    align-items: center;
    height: 16px;
    font-weight: var(--fw-semibold);
}

.separator .line {
    height: 0;
    border: 1px solid var(--divider);
    flex: 1 1 auto;
}

.separator .label {
    margin: 0 15px;
    height: 16px;
    line-height: 16px;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    font-feature-settings: 'tnum' on, 'lnum' on;
    color: var(--text);
    flex: none;
    order: 1;
    flex-grow: 0;
}

.separator .line-2 {
    order: 2;
}

.login-external-button {
    width: 100%;
    box-sizing: border-box;
    margin-top: 1rem;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    cursor: pointer;
    background-color: var(--surface);
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    font-feature-settings: 'tnum' on, 'lnum' on;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text);
}

.login-external-button img.icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.login-external-button:hover {
    background-color: var(--surface-hover);
}

.login-status {
    margin-top: .5rem;
    min-height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.spinner {
    width: 13px;
    height: 13px;
    border: 3px solid #fff;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    display: none; 
}

@keyframes spin { to { transform: rotate(360deg); } }

.auth-error {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    line-height: 1.35;
    text-align: center;
}

.auth-error__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.auth-error__text {
    word-break: break-word;
}

.auth-error[hidden] {
    display: none !important;
}

.button.is-submitting #spinner { display: inline-block;  }

.button.is-submitting #submitText { opacity: 0.7; }

.container fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

.container fieldset > legend {
    display: none;
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--password-toggle-bg);
    border: none;
    cursor: pointer;
    width: 1rem;
    height: 1rem;
    padding: 0;
    display: none; 
}

    .password-toggle.eye-closed {
        -webkit-mask: url("/images/eye_closed.svg") no-repeat center / contain;
        mask: url("/images/eye_closed.svg") no-repeat center / contain;
    }

    .password-toggle.eye-open {
        -webkit-mask: url("/images/eye_open.svg") no-repeat center / contain;
        mask: url("/images/eye_open.svg") no-repeat center / contain;
    }

    .password-toggle:hover {
        background-color: var(--password-toggle-bg-hover);
    }

.password-field.has-value .password-toggle {
    display: block;
}

iframe.signout {
    display: none;
}

.error-retry-link {
    margin: 1rem;
}

.error-info-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--divider);
}

.error-info-title {
    font-weight: var(--fw-semibold);
    margin-bottom: 1rem;
}

.error-details {
    font-size: 0.9rem;
}

#postLogoutLink {
    color: var(--blue-200);
}

@media (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .main {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
    }

    .logo {
        width: 14rem;
        display: block;
        margin-inline: auto;
    }

    .container {
        width: 100%;
        max-width: 95%;
        margin-inline: 1rem;
    }
}