/* IES NG Login Theme */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../fonts/Inter-300.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/Inter-400.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/Inter-500.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/Inter-600.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/Inter-700.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("../fonts/Inter-800.ttf") format("truetype");
}

:root {
    --ies-primary-100: #e4f1ff;
    --ies-primary-200: #8ebcf2;
    --ies-primary-300: #1c79e5;
    --ies-primary-400: #155bac;
    --ies-primary-500: #0e3d73;
    --ies-swiss-red: #e2001a;
    --ies-typo-400: #768ea6;
    --ies-typo-500: #526a80;
    --ies-typo-700: #28313e;
    --ies-surface-100: #ffffff;
    --ies-elements-300: #cedae5;
    --ies-radius-lg: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    height: 100%;
}
body {
    min-height: 100%;
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
}

.ies-login-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(
        145deg,
        #0b2e57 0%,
        #0e3d73 40%,
        #155bac 70%,
        #3b93f7 100%
    );
}

.ies-bundeszeile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ies-swiss-red);
    z-index: 10;
}

#iesNetworkCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ies-login-main {
    position: relative;
    z-index: 5;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ies-login-card {
    position: relative;
    width: 440px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 80px rgba(28, 121, 229, 0.08);
    overflow: hidden;
    animation: iesCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes iesCardIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(24px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.ies-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    padding-left: 12px;
    animation: iesLogoIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.3s;
}

.ies-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--ies-radius-lg);
    object-fit: contain;
}

.ies-logo-wordmark {
    height: 18px;
    width: auto;
}

@keyframes iesLogoIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ies-locale-switch {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.ies-locale-switch select {
    border: 1px solid var(--ies-elements-300);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ies-typo-700);
    font: inherit;
}

.ies-template-header {
    margin-bottom: 24px;
    color: var(--ies-typo-700);
}

.ies-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--ies-typo-700);
    margin-bottom: 32px;
}

.ies-heading--with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ies-view {
    display: none;
}

.ies-view--active {
    display: block;
    animation: iesViewIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes iesViewIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ies-alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.5;
}

.ies-alert--error {
    background: #fff1f1;
    border-color: #f5c6cb;
    color: #8f1d1d;
}

.ies-alert--warning {
    background: #fff4ea;
    border-color: #ffdebf;
    color: #8c511a;
}

.ies-alert--success,
.ies-alert--info {
    background: #eef7ff;
    border-color: #c9dff8;
    color: var(--ies-primary-500);
}

.ies-idp-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
}

.ies-idp-list li a,
.ies-idp-btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 53px;
    padding: 12px 20px 12px 12px;
    border: 1.5px solid var(--ies-elements-300);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ies-typo-700);
    background: var(--ies-surface-100);
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s,
        box-shadow 0.15s,
        transform 0.1s;
    gap: 14px;
    outline: none;
    text-decoration: none;
    font-family: inherit;
}

.ies-idp-list li a:hover,
.ies-idp-btn:hover {
    border-color: var(--ies-primary-300);
    background: var(--ies-primary-100);
    box-shadow: 0 2px 8px rgba(28, 121, 229, 0.1);
}

.ies-idp-list li a:active,
.ies-idp-btn:active {
    transform: scale(0.98);
}

.ies-idp-list li a:focus-visible,
.ies-idp-btn:focus-visible {
    border-color: var(--ies-primary-400);
    outline: 2px solid var(--ies-primary-400);
    outline-offset: 2px;
    box-shadow: none;
}

.ies-idp-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--ies-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.ies-idp-icon--dynamic {
    background: var(--ies-primary-500);
}

.ies-idp-icon--nexplore {
    background: #f05a09;
    padding: 6px;
}

.ies-idp-icon--nexplore img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ies-idp-icon--dynamic i,
.ies-provider-badge--dynamic i {
    font-size: 18px;
    line-height: 1;
}

.ies-idp-icon--ies-notfall {
    background: var(--ies-swiss-red);
}

.ies-idp-icon--generic {
    background: var(--ies-primary-500);
}

.ies-idp-arrow {
    margin-left: auto;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0;
    transition:
        opacity 0.15s,
        transform 0.15s;
    color: var(--ies-primary-300);
}

.ies-idp-list li a:hover .ies-idp-arrow,
.ies-idp-btn:hover .ies-idp-arrow {
    opacity: 1;
    transform: translateX(4px);
}

.ies-idp-list li:nth-child(1) {
    animation: iesBtnSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.5s;
}
.ies-idp-list li:nth-child(2) {
    animation: iesBtnSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.6s;
}
.ies-idp-list li:nth-child(3) {
    animation: iesBtnSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.7s;
}
.ies-idp-list li:nth-child(4) {
    animation: iesBtnSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.8s;
}

@keyframes iesBtnSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ies-homepage-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    padding-left: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ies-primary-300);
    text-decoration: none;
    transition: color 0.15s;
}

.ies-homepage-link:hover {
    color: var(--ies-primary-400);
}
.ies-homepage-link:focus-visible {
    outline: 2px solid var(--ies-primary-400);
    outline-offset: 2px;
    border-radius: 4px;
}
.ies-homepage-link svg {
    flex-shrink: 0;
}

#kc-form-wrapper {
    margin-top: 20px;
}

.ies-form-group {
    margin-bottom: 16px;
}

.ies-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ies-typo-700);
    margin-bottom: 6px;
}

#kc-form-login input[type="text"],
#kc-form-login input[type="password"],
.ies-form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--ies-elements-300);
    border-radius: 12px;
    font-size: 16px;
    color: var(--ies-typo-700);
    background: var(--ies-surface-100);
    outline: none;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
    font-family: inherit;
}

#kc-form-login input::placeholder {
    color: var(--ies-typo-400);
}

#kc-form-login input:focus {
    border-color: var(--ies-primary-400);
    outline: 2px solid var(--ies-primary-400);
    outline-offset: -1px;
    box-shadow: none;
}

#kc-form-login input[aria-invalid="true"] {
    border-color: #d9534f;
}

#kc-form-buttons {
    margin-top: 8px;
}

.ies-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--ies-primary-400);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.15s,
        transform 0.1s,
        opacity 0.15s;
    font-family: inherit;
}

.ies-submit-btn:hover {
    background: var(--ies-primary-500);
}
.ies-submit-btn:active {
    transform: scale(0.98);
}
.ies-submit-btn:focus-visible {
    outline: 2px solid var(--ies-primary-400);
    outline-offset: 2px;
}
.ies-submit-btn:disabled {
    opacity: 0.78;
    cursor: progress;
}

.ies-field-error {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #8f1d1d;
}

.ies-notfall-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 32px;
    padding: 12px 14px;
    background: #fff4ea;
    border: 1px solid #ffdebf;
    border-radius: 12px;
    font-size: 12px;
    color: #8c511a;
    line-height: 1.5;
}

.ies-notfall-hint svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.ies-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--ies-typo-500);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 4px;
    margin-bottom: 20px;
    border-radius: 4px;
    transition: color 0.15s;
    text-decoration: none;
    font-family: inherit;
}

.ies-back-btn:hover {
    color: var(--ies-primary-300);
}
.ies-back-btn:focus-visible {
    color: var(--ies-primary-400);
    outline: 2px solid var(--ies-primary-400);
    outline-offset: 2px;
}

.ies-redirect-state {
    text-align: center;
    padding: 20px 0 8px;
}

.ies-redirect-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ies-typo-700);
    margin-bottom: 8px;
}

.ies-redirect-state p {
    font-size: 14px;
    color: var(--ies-typo-500);
    line-height: 1.5;
}

.ies-provider-badge {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: var(--ies-primary-500);
}

.ies-provider-badge--dynamic {
    background: var(--ies-primary-500);
}

.ies-provider-badge--nexplore {
    background: #c2410c;
    padding: 10px;
}

.ies-provider-badge--nexplore img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ies-provider-badge--notfall {
    background: var(--ies-swiss-red);
}

.ies-spinner {
    width: 28px;
    height: 28px;
    margin: 24px auto 0;
    border: 3px solid var(--ies-elements-300);
    border-top-color: var(--ies-primary-300);
    border-radius: 50%;
    animation: iesSpin 0.8s linear infinite;
}

@keyframes iesSpin {
    to {
        transform: rotate(360deg);
    }
}

.ies-secondary-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--ies-primary-300);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.ies-secondary-link:hover {
    color: var(--ies-primary-400);
}

.ies-info-block {
    margin-top: 18px;
    color: var(--ies-typo-500);
    font-size: 14px;
}

.ies-template-footer {
    margin-top: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

#kc-header,
#kc-header-wrapper,
.kc-logo-text {
    display: none;
}

@media (max-width: 480px) {
    .ies-login-page {
        padding: 16px;
    }
    .ies-login-card {
        width: calc(100% - 8px);
        padding: 32px 24px 28px;
    }
    .ies-logo {
        margin-bottom: 36px;
        padding-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }

    #iesNetworkCanvas {
        display: none;
    }
}
