/* Formularz zapisów V1 (js/booking-form.js), wersja 2026-09-11 (pole „Wspólnota”).
   Style strony diecezji — odizolowane klasami bf-* od Bootstrapa 3. Serwis liturgia ma własne (zapisy.css). */
.bf {
    max-width: 720px;
    margin: 20px 0;
    padding: 24px;
    border: 1px solid #d8dce2;
    border-radius: 12px;
    background: #fff;
    color: #242936;
    font-size: 16px;               /* 16 px w polach: iOS nie powiększa strony przy fokusie */
    line-height: 1.6;
    overflow-wrap: break-word;
}
.bf *, .bf *::before, .bf *::after { box-sizing: border-box; }
.bf [hidden], .bf-fallback[hidden] { display: none !important; }
.bf p { margin: 0 0 10px; }
.bf a, .bf-contact a, .bf-fallback { color: #9d1826; text-decoration: underline; }
.bf :focus, .bf-contact a:focus, .bf-fallback:focus { outline: 3px solid #175fa6; outline-offset: 3px; }
.bf-sr {                           /* tekst tylko dla czytników ekranu */
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Stan naboru, informacje, komunikaty */
.bf-state, .bf-notice, .bf-errors {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-left: 4px solid #68758a;
    border-radius: 4px;
    background: #f0f3f7;
}
.bf .bf-state p { margin: 0; }
.bf .bf-state-title { font-weight: 700; }
.bf .bf-state-details { margin-top: 4px; }
.bf-state-open { border-color: #267047; background: #eff8f1; }
.bf-state-waitlist { border-color: #946307; background: #fff5dc; }
.bf-state-full { border-color: #ae1929; background: #fff1f2; }
.bf-preview { border-color: #175fa6; background: #edf4fb; font-weight: 700; }
.bf-info { margin: 0 0 16px; white-space: pre-line; }
.bf-status { margin: 0; color: #535b68; font-size: 14px; }
.bf-status:empty { display: none; }
.bf-errors { border-color: #ae1929; background: #fff1f2; color: #861322; }
.bf .bf-errors-title { margin: 0; font-weight: 700; }
.bf-errors ul { margin: 8px 0 0; padding-left: 22px; }
.bf-errors a { display: inline-block; min-height: 44px; padding: 9px 0; color: #861322; }
.bf-contact { margin: 16px 0 0; }

/* Pola */
.bf-form { margin: 8px 0 0; padding: 0; }
.bf-field { margin: 0 0 20px; }
.bf-subfield { margin-top: 12px; }
.bf .bf-label { display: block; margin: 0 0 6px; font-weight: 600; }
.bf .bf-input {
    display: block;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #727b88;
    border-radius: 6px;
    background: #fff;
    color: #242936;
    font: inherit;
    line-height: 1.5;
    box-shadow: none;
}
.bf textarea.bf-input { min-height: 116px; resize: vertical; }
.bf .bf-input[aria-invalid="true"] { border: 2px solid #ae1929; }
.bf .bf-input:disabled { background: #f0f2f5; color: #535b68; }
.bf .bf-help { margin: 6px 0 0; color: #535b68; font-size: 14px; }
.bf .bf-required-note { margin: 0 0 16px; }
.bf .bf-error { margin: 6px 0 0; color: #a41828; font-weight: 600; }
.bf .bf-error:empty { display: none; }

/* Grupy: parafia, opiekun, zgody */
.bf .bf-fieldset {
    display: block;
    min-width: 0;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid #d8dce2;
    border-radius: 8px;
}
.bf .bf-legend {
    width: auto;
    margin: 0;
    padding: 0 6px;
    border: 0;
    color: #242936;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}
.bf .bf-choices { margin: 0 0 8px; }
.bf .bf-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 44px;
    margin: 0 0 4px;
    padding: 8px 0;
    font-weight: 400;
    cursor: pointer;
}
.bf .bf-choice input[type="radio"], .bf .bf-choice input[type="checkbox"] {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 2px 0 0;
    accent-color: #ad1c2c;
}
.bf .bf-consent { margin-bottom: 12px; }
.bf-consent-link { display: inline-block; min-height: 44px; padding: 8px 0 8px 34px; }
.bf-guardian { background: #fbfaf6; }
.bf .bf-guardian > .bf-help { margin: 0 0 16px; }

/* Wspólnota: wybór wielokrotny, „Inna wspólnota” z polem nazwy, „Nie należę” oddzielone kreską */
.bf .bf-community > .bf-help { margin: 4px 0 8px; }
.bf .bf-community .bf-choices { margin: 0; }
.bf .bf-community-other { margin: 0 0 8px 34px; }
.bf .bf-choice-none { margin-top: 8px; padding-top: 12px; border-top: 1px solid #d8dce2; }
.bf .bf-community-status { margin: 6px 0 0; }
.bf .bf-community-status:empty { display: none; }

/* Combobox parafii */
.bf-combobox { position: relative; }
.bf .bf-options {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    margin: 4px 0 0;
    padding: 4px;
    list-style: none;
    border: 1px solid #727b88;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(24, 32, 48, .14);
}
.bf .bf-option { min-height: 44px; margin: 0; padding: 8px 12px; border-radius: 4px; cursor: pointer; }
.bf .bf-option:hover, .bf .bf-option[aria-selected="true"] { background: #e8eff8; color: #163f72; }
.bf .bf-option[aria-selected="true"] { outline: 2px solid #175fa6; outline-offset: -2px; }
.bf-option-name, .bf-option-meta { display: block; }
.bf-option-meta { color: #535b68; font-size: 13px; }

/* Honeypot: poza ekranem, niedostępny dla ludzi */
.bf-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    pointer-events: none;
}

/* Akcje i wynik */
.bf-actions { margin-top: 24px; }
.bf .bf-submit, .bf .bf-manage {
    display: inline-block;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid #a11929;
    border-radius: 6px;
    background: #a11929;
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.bf .bf-submit:hover, .bf .bf-manage:hover { background: #801421; color: #fff; }
.bf .bf-submit[aria-disabled="true"], .bf .bf-submit:disabled {
    border-color: #b5bcc7;
    background: #e0e3e8;
    color: #4c5563;
    cursor: default;
}
.bf-success { padding: 20px; border-left: 4px solid #267047; border-radius: 6px; background: #eff8f1; }
.bf-success-waitlist { border-color: #946307; background: #fff5dc; }
.bf .bf-heading { margin: 0 0 12px; color: #242936; font-size: 20px; font-weight: 700; line-height: 1.4; }
.bf-fallback { display: inline-block; min-height: 44px; padding: 10px 0; }

@media (min-width: 600px) {
    .bf .bf-submit, .bf .bf-manage { width: auto; min-width: 260px; }
}
@media (max-width: 480px) {
    .bf { padding: 16px; }
    .bf .bf-fieldset { padding: 12px; }
}
