/* The signup form (course_calendar/signup_form.html) in the look of the homepage's contact form
   (homepage-redesign css, .home-contact): a dark band from edge to edge (the user's wish, 2026-10-25),
   white labels, light fields 42px high and a full-width red button, the form 720px wide in the middle,
   from phones to desktops. */
.signup {
    margin-top: 2rem;
    padding: 56px 16px 64px;
    background: rgb(36, 41, 46);
    color: rgb(248, 248, 248);
    font-family: "Inter", sans-serif;
}

.signup-inner {
    width: min(100%, 720px);
    margin: 0 auto;
}

/* The band runs on into the footer, as on the homepage: no white strip between them, and the
   homepage's thin line between the form and the footer's content, as wide as that content
   (homepage-redesign CSS, body:has(.home-contact) .site-footer-shell). */
body:has(.signup) .site-footer {
    margin-top: 0;
}

body:has(.signup) .site-footer-shell {
    border-top: 1px solid rgba(248, 248, 248, 0.22);
}

.signup h2 {
    margin: 0 0 24px;
    color: rgb(248, 248, 248);
    font-size: clamp(1.5rem, 2.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-align: center;
}

.signup h3 {
    margin: 8px 0 12px;
    color: rgb(248, 248, 248);
    font-size: 1.15rem;
    font-weight: 700;
}

.signup form,
.signup fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.signup-field {
    display: block;
    min-width: 0;
    margin: 0 0 20px;
}

.signup label,
.signup-label {
    display: block;
    margin: 0 0 7px;
    color: rgb(248, 248, 248);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.3;
}

.signup label.signup-field {
    margin-bottom: 16px;
}

.signup input:not([type=radio]):not([type=checkbox]),
.signup select,
.signup textarea {
    display: block;
    width: 100%;
    border: 1px solid rgb(194, 196, 199);
    border-radius: 4px;
    /* The homepage's page colour (custom2.css, body) instead of glaring white (the user's wish, 2026-10-25). */
    background: rgb(248, 248, 248);
    color: rgb(36, 41, 46);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Lower than the homepage's 50px: this form has many fields, and tall ones overwhelm (the user, 2026-10-25). */
.signup input:not([type=radio]):not([type=checkbox]),
.signup select {
    height: 42px;
    padding: 0 12px;
}

/* Termin is a choice, not a box to type into (the user's wish, 2026-10-25): light grey, with a chevron
   of its own a little in from the edge, in place of the browser's small arrow squeezed against it. */
.signup select {
    padding-right: 46px;
    background: rgb(229, 231, 234) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' fill='none' stroke='%2324292e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 14px 9px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.signup select:hover {
    background-color: rgb(219, 222, 226);
}

/* Termin's own list (signup.js), standing in for the select, which stays hidden in the form: each
   date's free places as a dot at its left in the calendar's colours (custom2.css, .availability-*),
   in place of the words, grey for another organizer's date (the user's wishes, 2026-10-25). The
   button is the grey Termin field above; the list opens under it, dark like the form around it
   (the user liked his Mac's dark menu of the select; ours looks the same on every computer), with
   every title in full, wrapped rather than cut. */
.signup select[hidden] {
    display: none;
}

.signup-picker-wrap {
    position: relative;
}

.signup-picker {
    display: flex;
    width: 100%;
    height: 42px;
    align-items: center;
    gap: 10px;
    padding: 0 46px 0 12px;
    border: 1px solid rgb(194, 196, 199);
    border-radius: 4px;
    background: rgb(229, 231, 234) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' fill='none' stroke='%2324292e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 14px 9px;
    color: rgb(36, 41, 46);
    font-family: inherit;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
}

.signup-picker:hover {
    background-color: rgb(219, 222, 226);
}

.signup-picker:focus-visible {
    border-color: rgb(112, 116, 121);
    box-shadow: 0 0 0 3px rgba(248, 248, 248, 0.25);
    outline: none;
}

.signup-picker .signup-dot--none {
    display: none;
}

.signup-picker .signup-picker-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signup-picker-list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    max-height: min(60vh, 440px);
    margin: 0;
    padding: 6px 0;
    overflow-y: auto;
    border: 1px solid rgba(248, 248, 248, 0.18);
    border-radius: 6px;
    background: rgb(51, 56, 61);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    list-style: none;
}

.signup-picker-list:focus {
    outline: none;
}

.signup-picker-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 14px;
    color: rgb(248, 248, 248);
    font-size: 0.95rem;
    line-height: 1.35;
    cursor: pointer;
}

.signup-picker-list li.is-active {
    background: rgba(248, 248, 248, 0.1);
}

.signup-picker-list li[aria-selected=true] {
    font-weight: 600;
}

.signup-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.signup-picker-list .signup-dot {
    margin-top: calc(0.675em - 5px);
}

.signup-dot--free {
    background: #2e9d4f;
}

.signup-dot--last {
    background: #ef8a17;
}

.signup-dot--full {
    background: #d9342b;
}

.signup-dot--external {
    background: rgb(134, 140, 146);
}

.signup textarea {
    min-height: 84px;
    padding: 9px 12px;
    resize: vertical;
}

/* A later person's "jak u pierwszej osoby" clearly paler than typed text (the user's wish, 2026-10-25). */
.signup input::placeholder {
    color: rgb(166, 170, 175);
    opacity: 1;
}

.signup input:focus,
.signup select:focus,
.signup textarea:focus {
    border-color: rgb(112, 116, 121);
    box-shadow: 0 0 0 3px rgba(248, 248, 248, 0.25);
    outline: none;
}

.signup [aria-invalid=true] {
    border-color: rgb(255, 138, 128) !important;
}

.signup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 16px;
}

/* Firma | Osoba prywatna: two tabs, each half the form, standing on one white line across the whole
   form, under both of them (the user's wish, 2026-10-25, after the hotline form's tabs). The chosen tab is
   filled with the homepage's page colour, as the fields are, with dark text; the other stays on the dark
   band, dimmer. */
/* A gap above them twice the fields' own, so the tabs read as the start of a new part of the form,
   after Termin and its note (the user's wish, 2026-10-25). */
.signup-payer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 20px;
    border-bottom: 1px solid rgb(248, 248, 248);
}

.signup .signup-payer label {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.signup-payer input {
    position: absolute;
    opacity: 0;
}

.signup-payer span {
    display: flex;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 6px 6px 0 0;
    color: rgba(248, 248, 248, 0.6);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
}

.signup-payer label:hover span {
    background: rgba(248, 248, 248, 0.08);
    color: rgb(248, 248, 248);
}

.signup-payer input:checked + span {
    background: rgb(248, 248, 248);
    color: rgb(36, 41, 46);
    font-weight: 700;
}

.signup-payer input:focus-visible + span {
    outline: 2px solid rgba(248, 248, 248, 0.6);
    outline-offset: -4px;
}

.signup-payer input:checked:focus-visible + span {
    outline-color: rgb(112, 116, 121);
}

.signup-nip {
    display: flex;
    gap: 8px;
}

.signup-nip input {
    flex: 1 1 auto;
    min-width: 0;
}

.signup-lookup,
.signup-add {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 16px;
    border: 1px solid rgb(248, 248, 248);
    border-radius: 4px;
    background: transparent;
    color: rgb(248, 248, 248);
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.signup-lookup:hover,
.signup-add:hover {
    background: rgba(248, 248, 248, 0.12);
}

.signup-lookup:disabled {
    opacity: 0.6;
}

/* Each participant a card of its own (the user's wish, 2026-10-25): a lighter block reads as one
   person to fill in, less daunting than one long run of fields; "Dodaj uczestnika" is the outline
   of the next card. No title row: the person's number, #1, #2, stands in a narrow column on the
   card's left, level with the first labels, so the card is shorter and its fields sit indented; a
   bin that removes the person stands in a column as wide on its right, empty on a card that cannot
   go, so the fields, and the gap between their two columns, sit in the card's middle (the user's
   wishes, 2026-10-25). */
.signup-person {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    column-gap: 8px;
    margin: 0 0 12px;
    padding: 14px 14px 2px;
    border-radius: 8px;
    background: rgba(248, 248, 248, 0.07);
}

.signup-person-number {
    grid-column: 1;
    color: rgba(248, 248, 248, 0.82);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

/* Under Osoba prywatna the first person, nearly always the only one and the payer, is no card: their
   four fields in the form's own flow, no number, no background, no bin, aligned with the other fields;
   a person added after them is a card, #2 on (the user's wish, 2026-10-25). */
[data-payer-kind=person] [data-row]:first-child {
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: none;
}

[data-payer-kind=person] [data-row]:first-child :is(.signup-person-number, .signup-remove) {
    display: none;
}

[data-payer-kind=person] [data-row]:first-child label.signup-field {
    margin-bottom: 20px;
}

.signup-add {
    display: block;
    width: 100%;
    margin: 0 0 24px;
    border: 1px dashed rgba(248, 248, 248, 0.45);
    border-radius: 8px;
    color: rgba(248, 248, 248, 0.85);
}

.signup-add:hover {
    border-color: rgba(248, 248, 248, 0.8);
    color: rgb(248, 248, 248);
}

.signup-remove {
    display: flex;
    grid-column: 3;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    justify-self: end;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: rgba(248, 248, 248, 0.7);
}

.signup-remove[hidden] {
    display: none;
}

.signup-remove:hover {
    background: rgba(248, 248, 248, 0.12);
    color: rgb(248, 248, 248);
}

.signup-remove:focus-visible {
    outline: 2px solid rgba(248, 248, 248, 0.6);
    outline-offset: 0;
}

.signup-hint,
.signup-privacy {
    margin: 8px 0 0;
    color: rgba(248, 248, 248, 0.68);
    font-size: 0.85rem;
    line-height: 1.45;
}

.signup-hint:empty {
    display: none;
}

.signup-privacy a {
    color: rgb(248, 248, 248);
    text-decoration: underline;
}

.signup-privacy {
    text-align: center;
}

/* A full date or not enough places: the waiting list offered, in the amber of "Ostatnie wolne miejsca". */
.signup-note {
    margin: 10px 0 0;
    padding: 10px 14px;
    border-left: 3px solid rgb(239, 138, 23);
    background: rgba(239, 138, 23, 0.12);
    color: rgb(248, 248, 248);
    font-size: 0.95rem;
    line-height: 1.45;
}

.signup-external {
    margin: 0 0 8px;
    padding: 14px 16px;
    border-radius: 4px;
    background: rgba(248, 248, 248, 0.08);
    font-size: 1.05rem;
    line-height: 1.5;
}

.signup-error,
.signup-error--form {
    display: block;
    margin: 7px 0 0;
    /* The homepage's light red: dark red is barely readable on the dark block. */
    color: rgb(255, 138, 128);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
}

.signup-error--form {
    margin: 0 0 20px;
    font-size: 0.95rem;
}

.signup-done {
    margin: 0 0 24px;
    padding: 14px 16px;
    border-left: 3px solid rgb(46, 157, 79);
    background: rgba(46, 157, 79, 0.16);
    color: rgb(248, 248, 248);
    font-size: 1.05rem;
    line-height: 1.5;
}

.signup-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.signup-submit {
    display: flex;
    width: 100%;
    height: 50px;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 0 24px;
    border: 0;
    border-radius: 4px;
    background: rgb(230, 0, 0);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
}

.signup-submit:hover {
    background: rgb(204, 0, 0);
}

@media (max-width: 575.98px) {
    .signup {
        padding: 40px 16px 48px;
    }

    .signup-nip {
        flex-direction: column;
    }

    .signup-person {
        grid-template-columns: 26px minmax(0, 1fr) 26px;
        column-gap: 6px;
        padding: 12px 10px 2px;
    }

    .signup-remove {
        width: 26px;
    }
}

@media (min-width: 576px) {
    .signup-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* One middle line through the whole form (the user's wish, 2026-10-25): four equal columns, Ulica
       filling the left half and Nr budynku with Nr lokalu the right one, Kod pocztowy and Miasto a half
       each, so the address splits where every other pair of fields, cards included, splits. */
    .signup-address {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .signup-address :is(.signup-street, .signup-postal, .signup-city) {
        grid-column: span 2;
    }
}
