@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/Nunito-VariableFont_wght.ttf') format('truetype');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/Nunito-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 300 900;
    font-style: italic;
    font-display: swap;
}

:root {
    --primary-color: #4f7906;
    --primary-contrast: #ffffff;
    --button-radius: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1c2a3a;
}

.fallback-body {
    min-height: 100vh;
    padding: 40px 16px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
        url('/assets/hca_background.svg') center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fallback-wrapper {
    width: min(430px, 100%);
    padding: 32px 28px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 24px 70px rgba(15, 40, 68, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.fallback-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.fallback-logo img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 220px;
}

.fallback-headline {
    margin: 0 0 16px;
    text-align: center;
    color: #1c2a3a;
    font-size: 1.35rem;
    line-height: 1.2;
}

.fallback-message {
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-weight: 650;
    line-height: 1.35;
}

.fallback-message--error {
    color: #b00020;
    background: rgba(176, 0, 32, 0.08);
    border: 1px solid rgba(176, 0, 32, 0.3);
}

.fallback-form {
    margin-top: 18px;
    padding: 22px 24px;
    border-radius: var(--button-radius);
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(247, 251, 255, 0.7) 100%);
}

.fallback-label {
    display: block;
    margin: 0 0 8px;
    font-weight: 700;
    color: #1c2a3a;
}

.fallback-code-input {
    width: 100%;
    padding: 12px 16px;
    border: 3px solid var(--primary-color);
    border-radius: var(--button-radius);
    background: rgba(255, 255, 255, 0.92);
    color: #1c2a3a;
    font-size: 1.02rem;
    font-weight: 800;
    font-family: 'Nunito', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    letter-spacing: 0;
    text-transform: uppercase;
    direction: ltr;
    text-align: left;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.fallback-code-input:focus {
    border-color: #3d6002;
    background-color: #f6fff2;
}

.fallback-code-input[data-valid="false"] {
    border-color: #b00020;
}

.fallback-code-input[data-valid="true"] {
    border-color: #4f7906;
}

.fallback-status {
    min-height: 1.35em;
    margin-top: 8px;
    color: #4e5965;
    font-size: 0.92rem;
    line-height: 1.35;
}

.fallback-submit {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    border: none;
    border-radius: var(--button-radius);
    background: var(--primary-color);
    color: var(--primary-contrast);
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.fallback-submit:hover {
    background: #3d6002;
    transform: translateY(-1px);
}

.fallback-submit:disabled {
    cursor: not-allowed;
    opacity: 0.54;
    transform: none;
}

@media (max-width: 480px) {
    .fallback-wrapper {
        padding: 28px 20px;
    }

    .fallback-form {
        padding: 20px 18px;
    }

    .fallback-code-input {
        font-size: 0.94rem;
        padding-inline: 12px;
    }
}
