html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ---------------------------------------------------------------------------
   Setup cards.

   These used to be PlayerSetup.razor.css, scoped to that one component. They
   live here because a second screen now wears exactly the same card - the
   training setup (see TrainingSetup.razor) - and Blazor's scoped CSS stamps a
   per-component attribute onto its selectors, so a scoped rule cannot reach a
   second component's markup however identical it looks. The class names are
   already unique enough to sit in a global sheet.
   --------------------------------------------------------------------------- */
/* Matches the dark, edge-to-edge look of the rest of the action screen (see Home.razor.css's
   .play-screen) rather than introducing a lighter "setup wizard" look, since this is the very
   first screen a player sees before ever reaching that one. */
.player-setup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: #000;
    padding: 1rem;
    box-sizing: border-box;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.player-setup__card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    background: #14181c;
    border-radius: 0.75rem;
    padding: 1.4rem 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.player-setup__title {
    margin: 0;
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
}

.player-setup__subtitle {
    margin: -0.4rem 0 0.2rem;
    color: #9aa4ad;
    font-size: 0.85rem;
    text-align: center;
}

.player-setup__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* The small colored dot in front of the label previews the disc color this player will actually
   throw with, once the game starts (see PlayerDiscColorPalette / HoleMap's disc-color styling) -
   so the color assignment is visible right from setup, not only discovered mid-game. */
.player-setup__field-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #d7dce0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.player-setup__field-label::before {
    content: "";
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--disc-color, #ff4500);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
    flex: none;
}

/* Name and level sit side by side on one line: the level belongs to the player being entered, not
   to a step of its own. The name takes whatever width is left, the select keeps a fixed share wide
   enough to read "Internationaler Profi". */
.player-setup__field-row {
    display: flex;
    gap: 0.4rem;
    align-items: stretch;
}

.player-setup__field-row .player-setup__field-input {
    flex: 1 1 auto;
    min-width: 0;
}

.player-setup__field-input {
    background: #0a0f0a;
    border: 1px solid #4a5157;
    border-radius: 0.4rem;
    color: #ffffff;
    font-size: 1rem;
    padding: 0.55rem 0.7rem;
    box-sizing: border-box;
}

.player-setup__field-input:focus {
    outline: none;
    border-color: #ff8a3d;
}

.player-setup__start-button {
    margin-top: 0.4rem;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #ff8a3d 0%, #e56a1a 100%);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 0.7rem;
    box-shadow: 0 2px 6px rgba(229, 106, 26, 0.5);
}

.player-setup__start-button:disabled {
    background: #4a5157;
    box-shadow: none;
    opacity: 0.6;
}

/* The one-tap list of players already known on this device (see PlayerSetup's own comment). Sits
   between the subtitle and the name fields, so it reads as "pick one of these, or type a new one
   below" rather than as a separate feature bolted on after the fields. */
.player-setup__known {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid #262c32;
}

.player-setup__known-label {
    color: #9aa4ad;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.player-setup__known-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.player-setup__known-chip {
    background: #1e242a;
    color: #e6ebef;
    border: 1px solid #39424a;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
}

.player-setup__known-chip:hover:not(:disabled) {
    background: #2a323a;
    border-color: #4d5862;
}

/* A name that is already in one of the fields below, or that there is no free field left for:
   still listed, so the player can see it is known, but visibly out of play. */
.player-setup__known-chip:disabled {
    cursor: default;
    opacity: 0.45;
}

.player-setup__known-chip--chosen {
    border-color: #17c3d4;
    color: #17c3d4;
}

/* A known player's chip together with its delete button, kept on one line so the two always wrap
   as a pair. */
.player-setup__known-entry {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.player-setup__known-delete {
    background: transparent;
    color: #7d8790;
    border: none;
    border-radius: 999px;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
}

.player-setup__known-delete:hover {
    background: #3a2226;
    color: #ff6b6b;
}

/* The question that replaces a chip once its delete button was pressed. */
.player-setup__known-confirm {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.3rem 0.15rem 0.7rem;
    border: 1px solid #7a3038;
    border-radius: 999px;
    background: #2a1a1d;
    font-size: 0.8rem;
}

.player-setup__known-confirm-text {
    color: #ffb3b3;
}

.player-setup__known-confirm-button {
    background: #1e242a;
    color: #e6ebef;
    border: 1px solid #39424a;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
}

.player-setup__known-confirm-button--yes {
    background: #c0392b;
    border-color: #c0392b;
    color: #ffffff;
}

/* The training setup's own additions to the card above: a label over a control that is not a
   text field, the Tee/distance pair, and the way back to the start screen. */
.training-setup__label {
    color: #d7dce0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Two mutually exclusive choices shown as one segmented control rather than as radio buttons:
   at this size a radio's own dot is the smallest part of the target, and the choice reads
   better as two halves that light up. */
.training-setup__choice {
    display: flex;
    gap: 0.4rem;
}

.training-setup__choice-button {
    flex: 1 1 0;
    background: #1e242a;
    color: #e6ebef;
    border: 1px solid #39424a;
    border-radius: 0.4rem;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.55rem 0.5rem;
    cursor: pointer;
}

.training-setup__choice-button:hover {
    background: #2a323a;
}

.training-setup__choice-button--active {
    background: #2a323a;
    border-color: #ff8a3d;
    color: #ff8a3d;
    font-weight: 700;
}

.training-setup__distance {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.training-setup__distance-input {
    flex: 0 0 6rem;
}

.training-setup__distance-hint {
    color: #9aa4ad;
    font-size: 0.75rem;
}

.training-setup__back-button {
    border: 1px solid #39424a;
    border-radius: 0.5rem;
    background: transparent;
    color: #9aa4ad;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.55rem;
    cursor: pointer;
}

.training-setup__back-button:hover {
    color: #e6ebef;
    border-color: #4d5862;
}

/* The way into training from the start screen - deliberately quieter than "Spiel starten" above
   it: a round is what the app is for, training is the side door. */
.player-setup__training-button {
    border: 1px solid #39424a;
    border-radius: 0.5rem;
    background: transparent;
    color: #d7dce0;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.6rem;
    cursor: pointer;
}

.player-setup__training-button:hover {
    background: #1e242a;
    border-color: #4d5862;
}

/* --- Parcours-Auswahl (siehe CourseSetup.razor) ------------------------------------------------
   Die erste Karte eines Spiels: auf welchem Parcours gespielt wird. Sie traegt dieselbe Karte wie
   die Spieler- und die Trainingsauswahl, darum stehen hier nur die Teile, die es dort nicht gibt. */
.course-setup__list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    margin-top: 0.4rem;
}

.course-setup__course {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.course-setup__course:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Ein Parcours, den es noch nicht gibt: sichtbar, aber erkennbar nicht spielbar. */
.course-setup__course--soon {
    opacity: 0.45;
    cursor: default;
}

/* The name, place and hole count on top; the photo, when the course has one, underneath across the
   card's full width (see CourseInfo.ImagePath) - on user request ("Zeige die Parcourbilder in der
   Auswahl unter dem Text in der vollen Breite an, damit das Bild größer dargestellt wird"). */
.course-setup__course-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}

.course-setup__course-image {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.course-setup__course-name {
    font-size: 1.15rem;
    font-weight: 800;
}

.course-setup__course-location {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.course-setup__course-note {
    margin-top: 0.15rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

/* The start screen (see TitleScreen.razor): a black title bar in the app's orange, and the picture
   filling everything below it, with the start button laid over its lower edge. Same column width
   as every other setup screen. */
.title-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: #000;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.title-screen__title {
    margin: 0;
    padding: 0.9rem 1rem;
    background: #000;
    color: #ff8a3d;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: center;
}

/* The version number, small and quiet right under the title (see TitleScreen.razor). */
.title-screen__version {
    padding: 0 1rem 0.4rem;
    background: #000;
    color: #8a8f94;
    font-size: 0.7rem;
    text-align: center;
    letter-spacing: 0.04em;
}

.title-screen__picture {
    position: relative;
    flex: 1;
    min-height: 0;
}

.title-screen__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Pulled a little right of centre, so a narrow phone keeps the flying disc and the basket in view. */
    object-position: 62% 40%;
}

.title-screen__start-button {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    min-width: 12rem;
    padding: 0.8rem 1.6rem;
    cursor: pointer;
}
