/* Volunteer Form Widget */
.wcrs-volunteer-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 720px;
    width: 100%;
}

/* Field wrapper */
.wcrs-vf-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Field wrapper that is a <fieldset> (radio group): strip the UA chrome so it
   is indistinguishable from a .wcrs-vf-field <div>. The rendered <legend> is
   not a flex item, so the 4px column gap does not apply to it — its own
   margin-bottom restores the same spacing. */
.wcrs-vf-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.wcrs-vf-fieldset > legend {
    float: none;
    width: 100%;
    padding: 0;
    margin-bottom: 4px;
}

/* Conditional fields are toggled with the `hidden` attribute; it has to beat
   the `display: flex` of the wrappers above. */
.wcrs-volunteer-form [hidden] {
    display: none;
}

.wcrs-vf-subfield {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 24px;
}

.wcrs-vf-subfield:first-of-type {
    margin-top: 0;
}

/* Adres stacjonarny: kod pocztowy jest krótki, więc dzieli rząd z miejscowością.
   Kolumny liczone w ułamkach, bo kod ma stałą długość, a nazwa miasta nie. */
.wcrs-vf-address-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 16px;
}

.wcrs-vf-address-grid .wcrs-vf-subfield {
    margin-top: 24px;
}

@media (max-width: 600px) {
    .wcrs-vf-address-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
}

/* Labels */
.wcrs-vf-label {
    font-family: inherit;
    font-weight: 700;
    font-size: 18px;
    line-height: 28px;
    color: var(--wcrs-granatowy, #012D5B);
}

.wcrs-vf-sublabel {
    font-family: inherit;
    font-weight: 700;
    font-size: 16px;
    line-height: 26px;
    color: var(--wcrs-granatowy, #012D5B);
}

.wcrs-vf-required {
    color: #d63638;
}

/* Inputs & Textareas */
.wcrs-vf-input,
.wcrs-vf-textarea,
.wcrs-vf-select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(0, 181, 229, 0.5);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-weight: 300;
    font-size: 16px;
    line-height: 26px;
    color: #012D5B;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.wcrs-vf-input:focus,
.wcrs-vf-textarea:focus,
.wcrs-vf-select:focus {
    outline: none;
    border-color: #00B5E5;
    box-shadow: 0 0 0 2px rgba(0, 181, 229, 0.15);
}

.wcrs-vf-input::placeholder,
.wcrs-vf-textarea::placeholder {
    color: #9D9D9D;
}

.wcrs-vf-input.wcrs-vf-error,
.wcrs-vf-textarea.wcrs-vf-error,
.wcrs-vf-select.wcrs-vf-error {
    border-color: #d63638;
}

.wcrs-vf-textarea {
    height: 112px;
    padding: 16px;
    resize: vertical;
}

.wcrs-vf-select {
    appearance: auto;
    cursor: pointer;
}

/* Hints */
.wcrs-vf-hint {
    font-family: inherit;
    font-weight: 300;
    font-size: 12px;
    line-height: 18px;
    color: #012D5B;
}

/* Divider */
.wcrs-vf-divider {
    border: none;
    border-top: 1px solid rgba(0, 181, 229, 0.3);
    margin: 0;
}

/* Checkbox/Radio chip grid */
.wcrs-vf-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.wcrs-vf-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(0, 181, 229, 0.5);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.wcrs-vf-chip:hover {
    border-color: #00B5E5;
    background: rgba(0, 181, 229, 0.05);
}

.wcrs-vf-chip input[type="checkbox"],
.wcrs-vf-chip input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #00B5E5;
    cursor: pointer;
}

.wcrs-vf-chip input:checked + .wcrs-vf-chip-label {
    color: #012D5B;
    font-weight: 500;
}

.wcrs-vf-chip:has(input:checked) {
    border-color: #00B5E5;
    background: rgba(0, 181, 229, 0.08);
}

.wcrs-vf-chip.wcrs-vf-chip-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.wcrs-vf-chip-label {
    font-family: inherit;
    font-weight: 300;
    font-size: 16px;
    line-height: 26px;
    color: #012D5B;
    white-space: nowrap;
}

.wcrs-vf-chip--standalone {
    margin-top: 12px;
    width: fit-content;
}

/* Date row */
.wcrs-vf-date-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.wcrs-vf-date-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* File upload drop zone */
.wcrs-vf-file-drop {
    position: relative;
    border: 1px dashed #00B5E5;
    border-radius: 8px;
    background: #FAFAFA;
    min-height: 141px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.wcrs-vf-file-drop:hover,
.wcrs-vf-file-drop.wcrs-vf-file-dragover {
    border-color: #012D5B;
    background: rgba(0, 181, 229, 0.05);
}

.wcrs-vf-file-drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #012D5B;
    text-align: center;
    font-size: 16px;
    line-height: 26px;
}

.wcrs-vf-file-drop-inner svg {
    color: #012D5B;
}

.wcrs-vf-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Sam <input type="file"> jest przezroczysty, więc błąd zaznacza kafelek. */
.wcrs-vf-file-drop.wcrs-vf-error {
    border-color: #d63638;
}

/* Selected files are listed BELOW the drop zone (one row per file), so the zone
   stays empty and clickable — and the remove buttons are never covered by the
   absolutely-positioned file input. */
.wcrs-vf-file-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wcrs-vf-file-list[hidden] {
    display: none;
}

.wcrs-vf-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 181, 229, 0.3);
    border-radius: 8px;
    background: #fff;
}

.wcrs-vf-file-row img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.wcrs-vf-file-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 20px;
    color: #012D5B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wcrs-vf-file-size {
    font-size: 13px;
    color: #6B7280;
    white-space: nowrap;
}

.wcrs-vf-file-remove {
    background: none;
    border: none;
    color: #d63638;
    cursor: pointer;
    /* Big enough to read and to hit comfortably (touch target ~32px) */
    font-size: 24px;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.wcrs-vf-file-remove:hover,
.wcrs-vf-file-remove:focus-visible {
    background: rgba(214, 54, 56, 0.12);
    color: #b32d2e;
}

/* Consent */
.wcrs-vf-consent {
    flex-direction: row;
}

.wcrs-vf-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 16px;
    line-height: 26px;
    color: #012D5B;
    cursor: pointer;
}

/* Treść zgody przychodzi z edytora, więc jest owinięta w akapity. Wewnątrz
   etykiety mają się zachowywać jak tekst — bez odstępów i łamania układu. */
.wcrs-vf-consent-label p {
    display: inline;
    margin: 0;
}

.wcrs-vf-consent-label input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin-top: 2px;
    border: 1px solid #00B5E5;
    border-radius: 4px;
    accent-color: #00B5E5;
    cursor: pointer;
}

.wcrs-vf-consent-label a {
    color: #00B5E5;
    text-decoration: underline;
}

/* reCAPTCHA */
.wcrs-vf-recaptcha-badge {
    color: #9D9D9D;
    font-size: 12px;
}

/* Messages */
.wcrs-vf-messages {
    min-height: 0;
}

.wcrs-vf-messages:not(:empty) {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 22px;
}

.wcrs-vf-messages.wcrs-vf-success {
    background: #e6f7e6;
    color: #00a32a;
    border: 1px solid #00a32a;
}

.wcrs-vf-messages.wcrs-vf-error {
    background: #fce4e4;
    color: #d63638;
    border: 1px solid #d63638;
}

/* Submit button */
.wcrs-vf-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background-color: #012D5B;
    color: #fff;
    font-family: inherit;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.wcrs-vf-submit:hover {
    opacity: 0.9;
}

.wcrs-vf-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wcrs-vf-spinner {
    animation: wcrs-vf-spin 1s linear infinite;
}

@keyframes wcrs-vf-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .wcrs-vf-date-row {
        flex-direction: column;
    }

    .wcrs-vf-chip {
        width: 100%;
    }

    .wcrs-vf-label {
        font-size: 16px;
        line-height: 24px;
    }
}

/* Okno z potwierdzeniem wysyłki -------------------------------------------- */

/* Nadrzędny wrapper widgetu bywa pozycjonowany, więc okno wychodzi z układu
   przez position: fixed na całym oknie przeglądarki, a nie na sekcji. */
.wcrs-vf-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.wcrs-vf-modal[hidden] {
    display: none;
}

.wcrs-vf-modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(1, 45, 91, 0.55);
}

.wcrs-vf-modal__box {
    position: relative;
    width: 100%;
    max-width: 480px;
    padding: 32px;
    border-radius: 16px;
    background-color: #fff;
    box-shadow: 0 24px 64px rgba(1, 45, 91, 0.25);
    text-align: center;
}

.wcrs-vf-modal__close {
    position: absolute;
    top: 8px;
    right: 12px;
    padding: 4px 8px;
    border: none;
    background: none;
    color: #012D5B;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.wcrs-vf-modal__heading {
    margin: 0 0 12px;
    color: #012D5B;
    font-family: inherit;
    font-weight: 700;
    font-size: 22px;
    line-height: 30px;
}

.wcrs-vf-modal__heading[hidden] {
    display: none;
}

.wcrs-vf-modal__text {
    margin: 0 0 24px;
    color: #012D5B;
    font-size: 16px;
    line-height: 26px;
}

.wcrs-vf-modal__button {
    min-width: 160px;
    height: 44px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background-color: #012D5B;
    color: #fff;
    font-family: inherit;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.wcrs-vf-modal__button:hover {
    opacity: 0.9;
}

@media (max-width: 600px) {
    .wcrs-vf-modal__box {
        padding: 24px 20px;
    }
}
