.mw-zapisy {
    --mw-accent: #1A2E56;
    --mw-border: #d9dee7;
    --mw-muted: #5c6070;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    color: inherit;
    font: inherit;
}

.mw-zapisy--closed {
    padding: 16px 20px;
    border: 1px solid var(--mw-border);
    border-radius: 8px;
    background: #f6f7f9;
}

.mw-zapisy__summary {
    padding: 20px 24px;
    border-radius: 8px;
    background: var(--mw-accent);
    color: #fff;
}

.mw-zapisy .mw-zapisy__title {
    margin: 0 0 12px;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1.35;
}

.mw-zapisy__summary dl {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin: 0;
}

.mw-zapisy__summary dt {
    font-size: .8rem;
    opacity: .75;
}

.mw-zapisy__summary dd {
    margin: 0;
    font-weight: 600;
}

.mw-zapisy__summary small {
    font-weight: 400;
    opacity: .75;
}

.mw-zapisy__errors {
    margin: 0;
    padding: 12px 16px 12px 36px;
    border-left: 4px solid #c62828;
    background: #fdecea;
    color: #8e1c1c;
}

.mw-zapisy fieldset {
    margin: 0;
    padding: 16px 20px 20px;
    border: 1px solid var(--mw-border);
    border-radius: 8px;
    min-width: 0;
}

.mw-zapisy legend {
    padding: 0 6px;
    font-weight: 600;
}

.mw-zapisy__variants label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 24px;
    cursor: pointer;
}

.mw-zapisy__people {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mw-zapisy__person {
    position: relative;
}

.mw-zapisy__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.mw-zapisy__field span {
    display: block;
    margin-bottom: 4px;
    color: var(--mw-muted);
    font-size: .875rem;
}

.mw-zapisy__field input {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--mw-border);
    border-radius: 6px;
    background: #fff;
    color: inherit;
    font: inherit;
}

.mw-zapisy__field input:focus {
    outline: none;
    border-color: var(--mw-accent);
    box-shadow: 0 0 0 3px rgba(26, 46, 86, .15);
}

.mw-zapisy__remove {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--mw-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.mw-zapisy__remove:hover {
    color: #c62828;
}

.mw-zapisy__add {
    align-self: flex-start;
    padding: 10px 16px;
    border: 1px dashed var(--mw-accent);
    border-radius: 6px;
    background: none;
    color: var(--mw-accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.mw-zapisy__add:hover {
    background: rgba(26, 46, 86, .06);
}

.mw-zapisy__tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.mw-zapisy__tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 20px 20px 56px;
    border: 2px solid var(--mw-border);
    border-radius: 10px;
    background: #fff;
    line-height: 1.45;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.mw-zapisy__tile:hover {
    border-color: #aab4c8;
}

.mw-zapisy__tile:has(input:checked) {
    border-color: var(--mw-accent);
    box-shadow: 0 0 0 3px rgba(26, 46, 86, .12);
}

.mw-zapisy__tile input {
    position: absolute;
    top: 22px;
    left: 20px;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--mw-accent);
}

.mw-zapisy__tile strong {
    font-size: 1.125rem;
    color: var(--mw-accent);
}

.mw-zapisy__tile span {
    color: var(--mw-muted);
    font-size: .9rem;
}

.mw-zapisy__exempt {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 20px;
    border: 1px solid var(--mw-border);
    border-radius: 8px;
    background: #fff;
    line-height: 1.5;
    cursor: pointer;
}

.mw-zapisy__exempt:has(input:checked) {
    border-color: var(--mw-accent);
}

.mw-zapisy__exempt input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--mw-accent);
}

.mw-zapisy__exempt small {
    display: block;
    margin-top: 4px;
    color: var(--mw-muted);
}

.mw-zapisy__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--mw-border);
}

.mw-zapisy__total {
    margin: 0;
    font-size: 1.125rem;
}

.mw-zapisy__total small {
    color: var(--mw-muted);
    font-size: .875rem;
}

.mw-zapisy__submit {
    padding: 14px 28px;
    border: 0;
    border-radius: 6px;
    background: var(--mw-accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.mw-zapisy__submit:hover {
    filter: brightness(1.2);
}

.mw-zapisy__submit:disabled {
    opacity: .6;
    cursor: wait;
}

@media (max-width: 600px) {
    .mw-zapisy__fields {
        grid-template-columns: 1fr;
    }

    .mw-zapisy__footer {
        flex-direction: column;
        align-items: stretch;
    }
}
