/* Formularz „Zostaw wiadomość” – zielone tło, siatka 4 kolumn (formularz w 2 pierwszych) */

.vca-contact-msg-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    margin-block-start: 0 !important;
    padding: 0;
    box-sizing: border-box;
}

.vca-contact-msg {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 4.375rem 0 2.1875rem;
    overflow: hidden;
    box-sizing: border-box;
}

.vca-contact-msg__bg-image {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-size: auto;
    background-position: 0 0;
    background-repeat: repeat;
    pointer-events: none;
    opacity: 0.35;
}

/* Dekoracyjne kropki (lewy dolny róg), gdy brak obrazka z ACF */
.vca-contact-msg__dots {
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(45%, 420px);
    height: min(40%, 320px);
    z-index: 1;
    pointer-events: none;
    background-image: radial-gradient(rgba(0, 0, 0, 0.12) 1px, transparent 1px);
    background-size: 10px 10px;
    mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 70%);
}

.vca-contact-msg__container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Formularz wyśrodkowany, maks. szerokość dla czytelności */
.vca-contact-msg__grid {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: start;
}

.vca-contact-msg__form-col {
    grid-column: 1;
    width: 100%;
    max-width: 684px;
    min-width: 0;
    margin: 0 auto;
}

.vca-contact-msg__title {
    margin: 0 0 2.5rem;
    text-align: center;
    font-family: type-36, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 36px;
    color: rgba(255, 255, 255, 0.98);
}

.vca-contact-msg__form {
    margin: 0;
    padding: 0;
    width: 100%;
}

.vca-contact-msg__field {
    margin: 0 0 1.75rem;
}

.vca-contact-msg__field--hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Jedna linia: etykieta po lewej, pille po prawej; pionowo wyśrodkowane względem siebie */
.vca-contact-msg__method {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.25rem;
    row-gap: 0.75rem;
    margin: 0 0 1.75rem;
    padding: 0;
    min-width: 0;
}

.vca-contact-msg__method-label {
    grid-column: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left;
    font-family: type-36, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    color: #fff;
    width: auto;
    max-width: 100%;
    display: flex;
    align-items: center;
    align-self: center;
}

.vca-contact-msg__method .vca-contact-msg__pills {
    grid-column: 2;
    align-self: center;
}

.vca-contact-msg__req {
    color: rgba(255, 255, 255, 0.95);
}

/* Pola „tylko linia” */
.vca-contact-msg__input,
.vca-contact-msg__textarea {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.35rem 0;
    box-sizing: border-box;
    border: none;
    border-bottom: 0.1rem solid rgba(255, 255, 255, 0.6);
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-family: type-36, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s ease;
}

.vca-contact-msg__input::placeholder,
.vca-contact-msg__textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.vca-contact-msg__input:focus,
.vca-contact-msg__textarea:focus {
    border-bottom-color: rgba(255, 255, 255, 0.95);
}

.vca-contact-msg__textarea {
    min-height: 3.25rem;
    resize: vertical;
}

/* Pills Telefon / Email – grupa po prawej */
.vca-contact-msg__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    align-items: center;
    justify-content: flex-end;
    flex: 0 1 auto;
    margin: 0;
    margin-left: auto;
}

.vca-contact-msg__pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.5rem 1rem 0.5rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-family: type-36, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.vca-contact-msg__pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.vca-contact-msg__pill-ui {
    position: relative;
    flex-shrink: 0;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: transparent;
    box-sizing: border-box;
}

/* Niezaznaczone: pusty biały pierścień */
.vca-contact-msg__pill input:not(:checked) + .vca-contact-msg__pill-ui::after {
    display: none;
}

/* Zaznaczone: białe kółko + zielony ptaszek */
.vca-contact-msg__pill input:checked + .vca-contact-msg__pill-ui {
    background: #fff;
    border-color: #fff;
    box-shadow: none;
}

.vca-contact-msg__pill input:checked + .vca-contact-msg__pill-ui::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 45%;
    width: 0.28rem;
    height: 0.55rem;
    margin: 0;
    border: solid var(--vca-cmf-pill-check, #23c767);
    border-width: 0 0.12rem 0.12rem 0;
    transform: translate(-50%, -50%) rotate(45deg);
    box-sizing: border-box;
}

.vca-contact-msg__pill input:focus-visible + .vca-contact-msg__pill-ui {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.vca-contact-msg__pill:has(input:checked) {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

@media (max-width: 520px) {
    .vca-contact-msg__method {
        grid-template-columns: 1fr;
    }

    .vca-contact-msg__method-label {
        grid-column: 1;
        min-width: 0;
    }

    .vca-contact-msg__method .vca-contact-msg__pills {
        grid-column: 1;
        margin-left: 0;
        justify-content: flex-start;
    }
}

.vca-contact-msg__conditional--hidden {
    display: none !important;
}

/* Zgoda RODO */
.vca-contact-msg__consent {
    margin: 0 0 1rem;
    padding: 1rem 1.1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    box-sizing: border-box;
}

.vca-contact-msg__consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.95);
}

.vca-contact-msg__consent-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    accent-color: #fff;
    cursor: pointer;
}

.vca-contact-msg__consent-text {
    flex: 1;
    min-width: 0;
}

.vca-contact-msg__hint {
    margin: 0 0 1.5rem;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.vca-contact-msg__actions {
    display: flex;
    justify-content: center;
    margin: 0;
}

.vca-contact-msg__submit {
    display: inline-block;
    margin: 0;
    padding: 0.85rem 2.75rem;
    border: none;
    border-radius: 2px;
    background: #fff;
    color: #23c767;
    font-family: type-36, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.vca-contact-msg__submit:hover {
    opacity: 0.92;
}

.vca-contact-msg__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.vca-contact-msg__status {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 15px;
    line-height: 1.45;
    color: #fff;
}

.vca-contact-msg__status[data-state="error"] {
    color: #ffe8e8;
}

.vca-contact-msg__status[data-state="success"] {
    color: rgba(255, 255, 255, 0.98);
}

/* Edytor Gutenberga – czytelny podgląd */
.block-editor-block-list__layout .vca-contact-msg {
    padding: 2rem 0 1rem;
}

@media (max-width: 768px) {
    .vca-contact-msg {
        padding: 2.375rem 0 2.1875rem;
    }

    .vca-contact-msg__title {
        font-size: 1.375rem;
        line-height: 1.3;
    }
}
