/* ========================= */
/* FORMULARZE [101] (aq-forms) – wygląd przeniesiony ze Spectra .formularz */
/* ========================= */
/* Ładowany na froncie i w edytorze (functions.php). W edytorze formularza nie ma <form class="aqf">, stąd .is-root-container:has(). */

.aqf,
.is-root-container:has(> .aqf-field) {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 300;
}
.aqf p,
.is-root-container:has(> .aqf-field) p { margin: 0; }
.is-root-container:has(> .aqf-field) > * { margin-block: 0; }
.aqf-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.aqf-label,
.aqf-legend {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    font-size: 15px;
}
.aqf-req { color: #ff0000; }

.aqf-input,
.aqf-select,
.aqf-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 300;
    color: #000;
    background-color: #fff;
    border: 1px solid #BDBDBD;
    border-radius: 2px;
}
.aqf-input:focus,
.aqf-select:focus,
.aqf-textarea:focus { outline: none; }
.aqf-textarea { height: 90px; resize: vertical; }
.aqf-field--invalid .aqf-input,
.aqf-field--invalid .aqf-select,
.aqf-field--invalid .aqf-textarea,
.aqf :user-invalid { border-color: #d32f2f; }

.aqf-option {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 20px;
    line-height: 21px;
}
.aqf-check {
    appearance: none;
    flex: none;
    width: 12px;
    height: 12px;
    margin: 0;
    border: 1px solid currentColor;
    border-radius: 3px;
    background: #fff center / 10px no-repeat;
    cursor: pointer;
}
.aqf-check:checked {
    border-color: #017cba;
    background-color: #017cba;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.5'/></svg>");
}
.aqf-check:focus-visible { outline: 2px solid #017cba !important; outline-offset: 2px; }

.aqf-submit {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    padding: 1rem 0;
    border: 0;
    background-color: transparent;
    color: var(--wp--preset--color--contrast);
    font-family: var(--wp--preset--font-family--bodoni-moda);
    font-size: var(--wp--preset--font-size--x-large);
    font-weight: 300;
    line-height: 1.4;
    cursor: pointer;
}
.aqf-submit::after {
    content: "";
    width: 25px;
    height: 25px;
    margin-left: 25px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'><path d='M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z'/></svg>") no-repeat center / contain;
}
.aqf-submit:disabled { cursor: default; }
.aqf-submit--sending { opacity: .7; }
.aqf-submit--sent { opacity: .5; }

.aqf-msg { padding: 12px 16px; border-radius: 2px; white-space: pre-line; }
.aqf-msg--ok { border: 1px solid #2e7d32; color: #2e7d32; }
.aqf-msg--error { border: 1px solid #d32f2f; color: #d32f2f; }
