/*
 * Styling for the public promocode page. Deliberately hand-written and
 * build-free: the front page must never depend on `npm run build` having run.
 *
 * The colours, radii and max width below are the EventSight event theme of the
 * page this one replaces, so both look the same to a visitor.
 */
:root {
    --color-primary: #2f4a3a;
    --color-primary-contrast: #ffffff;
    --color-hover: #6aad85;
    --color-danger: #dc2626;
    --color-bg: #f7f6f1;
    --color-surface: rgba(247, 246, 241, 0.7);
    --color-text: #1a2b22;
    --color-text-muted: #5b6b62;
    --font-family: -apple-system, ".SFNSText-Regular", "Helvetica Neue", "Roboto", "Segoe UI", sans-serif;
    --radius-md: 10px;
    --radius-lg: 14px;
    --layout-max-width: 860px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    /* The artwork is set inline from config; this is the ground it sits on. */
    background-color: var(--color-bg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: var(--color-text);
    font-family: var(--font-family);
    line-height: 1.5;
}

.page {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 2.5rem 1rem 4rem;
}

.page__header {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
}

.card {
    padding: 6rem 5.5rem 5.75rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
}

/* Language picker — four equal columns, like the survey's radiogroup with
   colCount: 4. */
.languages {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 0 3rem;
    padding: 0;
    border: 0;
}

.language {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    cursor: pointer;
}

.language input[type="radio"] {
    width: 1.375rem;
    height: 1.375rem;
    margin: 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.field__label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
}

.field__required {
    color: var(--color-danger);
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font: inherit;
    font-size: 1rem;
    color: var(--color-text);
    background: #fff;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
}

input[type="text"][aria-invalid="true"] {
    border-color: var(--color-danger);
}

input[type="text"]:focus-visible,
button:focus-visible,
.language input[type="radio"]:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.field__error {
    margin: 0.5rem 0 0;
    color: var(--color-danger);
    font-size: 0.875rem;
    font-weight: 600;
}

button {
    min-width: 12.875rem;
    margin-top: 5.5rem;
    padding: 1.0625rem 2rem;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-primary-contrast);
    background: var(--color-primary);
    border: 0;
    border-radius: var(--radius-md);
    cursor: pointer;
}

button:hover {
    background: var(--color-hover);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .page {
        padding: 1.5rem 1rem 2.5rem;
    }

    .card {
        padding: 2rem 1.25rem 2.5rem;
    }

    .languages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 2rem;
    }

    button {
        width: 100%;
        margin-top: 2.5rem;
    }
}
