PluginProbe
Contact Forms by Cimatti / 2.3.0
Contact Forms by Cimatti v2.3.0
2.3.6 2.3.5 2.3.0 2.2.32 2.2.4 2.2.0 2.1.2 2.1.1 trunk 1.0 1.1 1.2 1.2.1 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 All 62 releases
contact-forms / assets / css / frontend.css

frontend.css in Contact Forms by Cimatti 2.3.0, at assets/css/frontend.css

1,520 lines 38.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* ============================================
2 CSS Custom Properties (Variables)
3 ============================================ */
4 .accua-form {
5 /* Input border color - themes can override this variable */
6 /* Using explicit color instead of currentColor to avoid issues with */
7 /* inputs that use color:transparent for placeholder hiding (date fields) */
8 --accua-form-input-border-color: #111;
9 }
10
11 /* Modern accessible spinner - replaces old gif spinner */
12 .accua_form_api_throbbler {
13 display: inline-block;
14 width: 20px;
15 height: 20px;
16 border: 2px solid currentColor;
17 border-right-color: transparent;
18 border-radius: 50%;
19 animation: accua-spinner-rotate 0.75s linear infinite;
20 vertical-align: middle;
21 opacity: 0.7;
22 }
23
24 /* Reduce motion for users who prefer it (EAA compliance) */
25 @media (prefers-reduced-motion: reduce) {
26 .accua_form_api_throbbler {
27 animation: none;
28 opacity: 0.5;
29 }
30 }
31
32 @keyframes accua-spinner-rotate {
33 to {
34 transform: rotate(360deg);
35 }
36 }
37
38 div.pfbc-error {
39 background-color: #fff;
40 border: 1px solid #ef9a9a;
41 border-left-width: 4px;
42 color: #c62828;
43 padding: 1em 1.25em;
44 margin: 1em 0;
45 border-radius: 4px;
46 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
47 }
48
49 .pfbc-error-heading {
50 display: block;
51 font-size: 1em;
52 margin-bottom: 0.5em;
53 font-weight: 600;
54 color: #c62828;
55 }
56
57 .pfbc-error-list {
58 margin: 0.5em 0 0;
59 padding-left: 1.5em;
60 color: #d32f2f;
61 }
62
63 /* Inline field errors with ARIA support - Modern 2025 Design
64 * WCAG 2.2 / European Accessibility Act compliant:
65 * - Adequate spacing for cognitive accessibility
66 * - Minimum readable font size (13px)
67 * - Proper contrast ratio (4.5:1+)
68 * - Icon + text for non-color-only error indication
69 * - Fast, smooth animation with height transition for fields below
70 */
71 .pfbc-inline-error {
72 color: #d32f2f;
73 padding: 0;
74 margin-top: 0.375em;
75 /* ~6px breathing room below input */
76 font-size: 0.8125rem;
77 /* 13px - consistent sizing regardless of parent */
78 line-height: 1.4;
79 /* Better readability per WCAG */
80 display: flex;
81 align-items: center;
82 gap: 0.375em;
83 /* Better icon-text separation */
84 max-height: 3em;
85 /* Set explicitly for transition */
86 overflow: hidden;
87 /* Required for max-height animation */
88 /* Fast smooth animation - 150ms with ease-in-out for natural feel */
89 animation: pfbc-error-appear 0.15s ease-in-out forwards;
90 }
91
92 /* Smooth exit animation - mirrors entrance but in reverse (slides up and fades out) */
93 .pfbc-inline-error.pfbc-error-removing {
94 animation: pfbc-error-disappear 0.15s ease-in-out forwards;
95 pointer-events: none;
96 }
97
98 /* Smooth appear animation - slides down from above */
99 @keyframes pfbc-error-appear {
100 from {
101 opacity: 0;
102 transform: translateY(-0.375em);
103 max-height: 0;
104 margin-top: 0;
105 }
106
107 to {
108 opacity: 1;
109 transform: translateY(0);
110 max-height: 3em;
111 /* Enough for multi-line errors */
112 margin-top: 0.375em;
113 }
114 }
115
116 /* Smooth disappear animation - slides up and fades out (reverse of appear) */
117 @keyframes pfbc-error-disappear {
118 from {
119 opacity: 1;
120 transform: translateY(0);
121 max-height: 3em;
122 margin-top: 0.375em;
123 }
124
125 to {
126 opacity: 0;
127 transform: translateY(-0.375em);
128 max-height: 0;
129 margin-top: 0;
130 }
131 }
132
133 /* Respect reduced motion preference (EAA compliance) */
134 @media (prefers-reduced-motion: reduce) {
135 .pfbc-inline-error {
136 animation: none;
137 }
138 }
139
140 .pfbc-inline-error::before {
141 content: "\26A0";
142 /* âš  Warning sign */
143 flex-shrink: 0;
144 font-size: 1em;
145 /* Match text size for proper alignment */
146 line-height: 1.4;
147 /* Match text line-height */
148 }
149
150 .pfbc-error-message {
151 flex: 1;
152 }
153
154 /* Fieldwrap needs relative positioning for absolute error placement */
155 .pfbc-fieldwrap {
156 position: relative;
157 }
158
159 /* File input help text styling */
160 .pfbc-help {
161
162 font-size: small;
163 color: #666;
164
165 }
166
167 .pfbc-element {
168 position: relative;
169 }
170
171 /* Error state - semantic error message below field conveys the error */
172 /* Don't override borders/colors - let theme and user's control panel settings apply */
173 .pfbc-element-has-error .pfbc-label label {
174 color: inherit;
175 }
176
177 /* Required field indicator with ARIA */
178 .pfbc-required {
179 color: #dc3545;
180 font-weight: bold;
181 }
182
183 /* Fieldset (fieldgroup) — no border by default; use modifier classes to opt in */
184 .accua-form fieldset {
185 border: none;
186 padding: 0;
187 margin: 0 0 1.5em 0;
188 }
189
190 /* Border variant */
191 .accua-form fieldset.accua-fieldset-border {
192 border: 1px solid #ccc;
193 border-radius: 4px;
194 padding: 1em 1.25em;
195 }
196
197 /* Legend: inline title sitting on the border line */
198 .accua-form fieldset legend {
199 padding: 0 0.5em;
200 font-weight: 600;
201 }
202
203 /* Title before the fieldset (outside/above the border) */
204 .accua-form .accua-fieldset-title-outer {
205 font-weight: 600;
206 margin: 0 0 0.5em 0;
207 }
208
209 /* Title inside the fieldset as a heading block */
210 .accua-form .accua-fieldset-title-inner {
211 font-weight: 600;
212 margin: 0 0 0.75em 0;
213 }
214
215 /* Last element in fieldset: no bottom margin */
216 .accua-form fieldset>.pfbc-element:last-of-type {
217 margin-bottom: 0;
218 }
219
220 /* standard (labels on top) */
221 .accua-form-view-standard .pfbc-element {
222 margin-bottom: 1.25em;
223 position: relative;
224 }
225
226 .accua-form-view-standard .pfbc-label {
227 margin-bottom: 0.375em;
228 }
229
230 .accua-form-view-standard .pfbc-label label {
231 display: block;
232 width: 100%;
233 }
234
235 .accua-form-view-standard .pfbc-textbox,
236 .accua-form-view-standard .pfbc-textarea,
237 .accua-form-view-standard .pfbc-select {
238 width: 100%;
239 display: block;
240 padding: 0.5em 0.75em;
241 box-sizing: border-box;
242 font-size: 1rem;
243 line-height: 1.4;
244 border: 1px solid;
245 border-color: inherit;
246 background-color: inherit;
247 }
248
249 .accua-form-view-standard .pfbc-select {
250 padding-right: 2.5em;
251 -webkit-appearance: none;
252 -moz-appearance: none;
253 appearance: none;
254 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
255 background-repeat: no-repeat;
256 background-position: right 12px center;
257 background-size: 12px;
258 cursor: pointer;
259 }
260
261 .accua-form-view-standard .pfbc-select::-ms-expand {
262 display: none;
263 }
264
265 .accua-form-view-standard .pfbc-textarea {
266 min-height: 6em;
267 resize: vertical;
268 }
269
270 .accua-form-view-standard .pfbc-fieldwrap {
271 width: 100%;
272 display: block;
273 position: relative;
274 }
275
276 .accua-form-view-standard .pfbc-buttons {
277 text-align: right;
278 }
279
280 /* sidebyside (labels on left) */
281 /* Uses float layout (not flex) so custom JS using .css('display','block') to */
282 /* show/hide fields doesn't break the label-beside-input alignment. */
283 .accua-form-view-sidebyside {
284 container-type: inline-size;
285 }
286
287 .accua-form-view-sidebyside .pfbc-element {
288 margin-bottom: 0.5em;
289 position: relative;
290 }
291
292 .accua-form-view-sidebyside .pfbc-element::after {
293 content: "";
294 display: table;
295 clear: both;
296 }
297
298 .accua-form-view-sidebyside .pfbc-elementbottom {
299 clear: both;
300 }
301
302 .accua-form-view-sidebyside .pfbc-label {
303 float: left;
304 width: 25%;
305 padding-top: 0.25rem;
306 padding-right: 0.5em;
307 box-sizing: border-box;
308 }
309
310 .accua-form-view-sidebyside .pfbc-label label {
311 display: block;
312 }
313
314 .accua-form-view-sidebyside .pfbc-fieldwrap {
315 margin-left: 25%;
316 position: relative;
317 }
318
319 /* Elements without a label (e.g. single checkboxes) should be left-aligned */
320 .accua-form-view-sidebyside .pfbc-element>.pfbc-fieldwrap:first-child {
321 margin-left: 0;
322 }
323
324
325 .accuaform-fieldtype-checkbox,
326 .accuaform-fieldtype-multicheckbox {
327 min-width: 1rem;
328 min-height: 1rem;
329 margin-left: 0;
330 }
331
332
333 .accua-form-view-sidebyside .pfbc-textbox,
334 .accua-form-view-sidebyside .pfbc-textarea,
335 .accua-form-view-sidebyside .pfbc-select {
336 width: 100%;
337 display: block;
338 padding: 0.5em 0.75em;
339 box-sizing: border-box;
340 font-size: 1rem;
341 line-height: 1.4;
342 border: 1px solid;
343 border-color: inherit;
344 background-color: inherit;
345 }
346
347 .accua-form-view-sidebyside .pfbc-select {
348 padding-right: 2.5em;
349 -webkit-appearance: none;
350 -moz-appearance: none;
351 appearance: none;
352 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
353 background-repeat: no-repeat;
354 background-position: right 12px center;
355 background-size: 12px;
356 cursor: pointer;
357 }
358
359 .accua-form-view-sidebyside .pfbc-select::-ms-expand {
360 display: none;
361 }
362
363 .accua-form-view-sidebyside .pfbc-textarea {
364 min-height: 6em;
365 resize: vertical;
366 }
367
368 .accua-form-view-sidebyside .pfbc-buttons {
369 text-align: right;
370 }
371
372 /* Responsive: stack labels on top when form container is narrow */
373 @container (max-width: 500px) {
374 .accua-form-view-sidebyside .pfbc-label {
375 float: none;
376 width: 100%;
377 padding-right: 0;
378 padding-bottom: 0.25em;
379 }
380 .accua-form-view-sidebyside .pfbc-fieldwrap {
381 margin-left: 0;
382 }
383 }
384
385 .pfbc-error {
386 padding: .5em;
387 margin-bottom: 1em;
388 }
389
390 .pfbc-error ul {
391 padding-left: 1.75em;
392 margin: 0;
393 margin-top: .25em;
394 }
395
396 /* .pfbc-checkbox {
397 padding: 0.5em 0;
398 border-bottom: 1px solid #f4f4f4;
399 } */
400
401 /* Accessibility: Focus styles for keyboard navigation */
402 .pfbc-textbox:focus,
403 .pfbc-textarea:focus,
404 .pfbc-select:focus,
405 .accua-form input[type="checkbox"]:focus,
406 .accua-form input[type="radio"]:focus,
407 .accua-form button:focus {
408 outline: 3px solid #0066cc;
409 outline-offset: 2px;
410 }
411
412
413 .accua-form .pfbc-element input.wp-color-picker {
414 margin-bottom: 0;
415 background-color: transparent;
416 padding: 1px 0;
417 color: inherit;
418 font-size: inherit;
419 /* Let theme and user's control panel settings handle borders */
420 }
421
422 /* HTML5 Color Picker Styling */
423 .pfbc-color-wrapper {
424 display: flex;
425 align-items: center;
426 gap: 0.75em;
427 }
428
429 .accua-form .pfbc-color-input {
430 /* Match height of text inputs */
431 width: 3em;
432 height: 2.5em;
433 min-height: 2.5em;
434 padding: 0.25em;
435 border: 1px solid #767676;
436 border-radius: 4px;
437 cursor: pointer;
438 /* Remove browser default styling */
439 -webkit-appearance: none;
440 -moz-appearance: none;
441 appearance: none;
442 background: transparent;
443 }
444
445 /* Remove the inner color swatch border in WebKit browsers */
446 .pfbc-color-input::-webkit-color-swatch-wrapper {
447 padding: 0;
448 }
449
450 .pfbc-color-input::-webkit-color-swatch {
451 border: none;
452 border-radius: 2px;
453 }
454
455 /* Firefox color swatch */
456 .pfbc-color-input::-moz-color-swatch {
457 border: none;
458 border-radius: 2px;
459 }
460
461 /* Focus state for accessibility */
462 .pfbc-color-input:focus {
463 outline: 2px solid #0073aa;
464 outline-offset: 2px;
465 }
466
467 .pfbc-color-hex {
468 font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
469 font-size: 0.9em;
470 color: #555;
471 min-width: 5.5em;
472 letter-spacing: 0.02em;
473 }
474
475 /* Inline label mode adjustments for color picker */
476 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-color-wrapper {
477 padding-top: 0.5em;
478 }
479
480 @media (min-width: 300px) and (max-width: 400px) {
481 .accua_forms_recaptcha2_container {
482 transform: scale(0.75);
483 transform-origin: 0 0;
484 }
485 }
486
487 @media (max-width: 300px) {
488 .accua_forms_recaptcha2_container {
489 transform: scale(0.6);
490 transform-origin: 0 0;
491 }
492 }
493
494 /* Captcha fields with the title hidden (default): the label stays in the
495 markup, visually hidden but available to screen readers and to the error
496 summary label lookup. !important: this sr-only utility must beat the
497 layout-specific label rules (e.g. the inline-label floating label). */
498 .accua-captcha-title-hidden .pfbc-label,
499 .accua-captcha-title-hidden .pfbc-floating-label {
500 position: absolute !important;
501 width: 1px !important;
502 height: 1px !important;
503 padding: 0 !important;
504 margin: -1px !important;
505 overflow: hidden !important;
506 clip: rect(0, 0, 0, 0) !important;
507 white-space: nowrap !important;
508 border: 0 !important;
509 }
510
511 /* reCAPTCHA notice printed in place of the floating badge when the badge is
512 hidden in the plugin settings (Google requires the branding to stay visible
513 somewhere in the user flow). */
514 .accua-forms-recaptcha3-notice {
515 font-size: 0.75em;
516 line-height: 1.4;
517 opacity: 0.8;
518 margin: 0.5em 0 0;
519 }
520
521 /* ========================================================================
522 Inline Label Layout - Material Design Inspired Floating Labels
523 ======================================================================== */
524
525 /**
526 * Inline Label Layout with Floating Labels
527 *
528 * This layout implements Material Design-inspired floating labels that:
529 * - Start inside the input field (inline)
530 * - Float to the top border when focused or filled
531 * - Use smooth transitions (200ms)
532 * - Maintain accessibility (WCAG 2.1 AAA compliant)
533 * - Prevent layout shift and flickering
534 */
535
536 .accua-form-view-inlinelabel .pfbc-element {
537 margin-bottom: 1em;
538 }
539
540 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper {
541 position: relative;
542 width: 100%;
543 }
544
545 /* Input field styling with space for floating label */
546 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-textbox,
547 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-textarea,
548 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-select {
549 width: 100%;
550 /* Balanced padding: top slightly larger for label space, but visually centered */
551 padding: 1em 0.75em 0.85em 0.75em;
552 box-sizing: border-box;
553 /* Use CSS variable for border color to ensure consistency across all inputs */
554 /* This prevents issues where color:transparent (used for date placeholder hiding) */
555 /* would make borders invisible when using border-color: inherit */
556 border: 1px solid var(--accua-form-input-border-color);
557 /* Increase font size for better readability */
558 font-size: 1rem;
559 line-height: 1.2;
560 background-color: inherit;
561 }
562
563 /* Add right padding to select elements for caret spacing */
564 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-select {
565 padding-right: 2.5em;
566 /* Remove native appearance for consistent cross-browser styling */
567 -webkit-appearance: none;
568 -moz-appearance: none;
569 appearance: none;
570 /* Custom dropdown caret using CSS */
571 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
572 background-repeat: no-repeat;
573 background-position: right 12px center;
574 background-size: 12px;
575 cursor: pointer;
576 /* Firefox-specific fixes for dropdown rendering */
577 text-indent: 0.01px;
578 text-overflow: '';
579 }
580
581 /* Firefox-specific: ensure dropdown opens properly with appearance:none */
582 @-moz-document url-prefix() {
583 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-select {
584 /* Firefox needs explicit color to render dropdown properly */
585 color: inherit;
586 }
587 }
588
589 /* Remove IE's native arrow */
590 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-select::-ms-expand {
591 display: none;
592 }
593
594 /* Textarea specific adjustments */
595 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-textarea {
596 min-height: 6em;
597 resize: vertical;
598 }
599
600 /* Floating label - starts inside the field, vertically centered for inputs */
601 /* Uses fixed position (1.6em from top) instead of 50% to prevent shift when error appears */
602 /* Calculation: input has padding 1em top + 0.85em bottom + ~1.2em line-height + border ≈ 3.15em total */
603 /* Center point ≈ 1.6em from top, adjusted for label's own height via translateY(-50%) */
604 .accua-form-view-inlinelabel .pfbc-floating-label {
605 position: absolute;
606 left: 0.75em;
607 top: 1.6em;
608 /* Fixed position = center of input, independent of wrapper height */
609 font-size: 1rem;
610 pointer-events: none;
611 transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
612 transform: translateY(-50%);
613 transform-origin: left center;
614 padding: 0;
615 z-index: 1;
616 max-width: calc(100% - 1.5em);
617 overflow: hidden;
618 text-overflow: ellipsis;
619 white-space: nowrap;
620 opacity: 0.6;
621 }
622
623 /* Textarea label - position at top instead of center */
624 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper:has(.pfbc-textarea) .pfbc-floating-label {
625 top: 1.25em;
626 transform: translateY(0);
627 }
628
629 /* Floating label - when field is focused or has value */
630 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.is-focused .pfbc-floating-label,
631 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.has-value .pfbc-floating-label {
632 top: 0;
633 left: 0.625em;
634 font-size: 0.75em;
635 opacity: 1;
636 background-color: var(--wp--preset--color--base, #fff);
637 padding: 0 0.375em;
638 transform: translateY(-50%);
639 max-width: calc(100% - 1.5em);
640 }
641
642 /* Description text below field */
643 .accua-form-view-inlinelabel .pfbc-description {
644 margin-top: 0.375em;
645 font-size: 0.875em;
646 line-height: 1.4;
647 opacity: 0.7;
648 }
649
650 /* Required asterisk */
651 .accua-form-view-inlinelabel .pfbc-floating-label .pfbc-required {
652 opacity: 0.85;
653 }
654
655 /* Fieldwrap for inline labels */
656 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-fieldwrap {
657 position: relative;
658 width: 100%;
659 display: block;
660 padding-bottom: 0;
661 }
662
663 /* Standard labels for checkboxes, radios, file inputs */
664 .accua-form-view-inlinelabel .pfbc-label {
665 margin-bottom: 0.5em;
666 display: block;
667 }
668
669 .accua-form-view-inlinelabel .pfbc-label label {
670 display: block;
671 font-weight: 500;
672 }
673
674 /* Buttons */
675 .accua-form-view-inlinelabel .pfbc-buttons {
676 text-align: right;
677 margin-top: 1.5em;
678 }
679
680 /* Accessibility: High contrast mode support.
681 'more' is the standard value; 'high' is kept for older WebKit. */
682 @media (prefers-contrast: more), (prefers-contrast: high) {
683 .accua-form-view-inlinelabel .pfbc-floating-label {
684 font-weight: 600;
685 opacity: 1;
686 }
687 }
688
689 /* Accessibility: Reduced motion support */
690 @media (prefers-reduced-motion: reduce) {
691 .accua-form-view-inlinelabel .pfbc-floating-label {
692 transition: none;
693 }
694 }
695
696 /* Hide placeholders and date field text when unfocused (prevents overlap with label) */
697 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-textbox::placeholder,
698 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-textarea::placeholder {
699 opacity: 0;
700 transition: opacity 200ms;
701 }
702
703 /* Hide date input placeholder text in all browsers */
704 /* WebKit browsers (Chrome, Safari, Edge) */
705 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper input[type="date"]::-webkit-datetime-edit-text,
706 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper input[type="date"]::-webkit-datetime-edit-month-field,
707 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper input[type="date"]::-webkit-datetime-edit-day-field,
708 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper input[type="date"]::-webkit-datetime-edit-year-field {
709 opacity: 0;
710 }
711
712 /* Firefox fallback - use color transparent to hide placeholder when empty */
713 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper input[type="date"]:not(.has-value):not(:focus) {
714 color: transparent;
715 opacity: 1;
716 }
717
718 /* Show placeholders when focused or has value */
719 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.is-focused .pfbc-textbox::placeholder,
720 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.is-focused .pfbc-textarea::placeholder,
721 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.has-value .pfbc-textbox::placeholder,
722 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.has-value .pfbc-textarea::placeholder {
723 opacity: 0.5;
724 }
725
726 /* Show date input text when focused or has value */
727 /* WebKit browsers */
728 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.is-focused input[type="date"]::-webkit-datetime-edit-text,
729 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.is-focused input[type="date"]::-webkit-datetime-edit-month-field,
730 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.is-focused input[type="date"]::-webkit-datetime-edit-day-field,
731 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.is-focused input[type="date"]::-webkit-datetime-edit-year-field,
732 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.has-value input[type="date"]::-webkit-datetime-edit-text,
733 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.has-value input[type="date"]::-webkit-datetime-edit-month-field,
734 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.has-value input[type="date"]::-webkit-datetime-edit-day-field,
735 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper.has-value input[type="date"]::-webkit-datetime-edit-year-field {
736 opacity: 1;
737 }
738
739 /* Firefox fallback - show color when focused or has value */
740 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper input[type="date"]:focus,
741 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper input[type="date"].has-value {
742 color: inherit;
743 }
744
745 /* Date input - ensure consistent height and picker icon alignment */
746 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper input[type="date"] {
747 /* Same padding as other inputs */
748 padding: 1em 0.75em 0.85em 0.75em;
749 cursor: pointer;
750 /* Use same font as other inputs for consistency and accessibility */
751 font-family: inherit;
752 font-size: 1rem;
753 }
754
755 /* Style the native calendar picker in WebKit browsers (Chrome, Safari, Edge) */
756 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
757 cursor: pointer;
758 opacity: 0.6;
759 padding: 0;
760 margin: 0;
761 }
762
763 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper input[type="date"]::-webkit-calendar-picker-indicator:hover {
764 opacity: 1;
765 }
766
767 /* ==========================================================================
768 File Upload - Accessible Drag & Drop
769 WCAG 2.2 AA Compliant / European Accessibility Act
770 ========================================================================== */
771
772 /* Wrapper */
773 .accua-file-upload-wrapper {
774 position: relative;
775 width: 100%;
776 }
777
778 /* Dropzone */
779 .accua-file-dropzone {
780 display: flex;
781 flex-direction: column;
782 align-items: center;
783 justify-content: center;
784 min-height: 120px;
785 padding: 1.5rem 1rem;
786 border: 2px dashed #ccc;
787 background-color: #fafafa;
788 cursor: pointer;
789 transition: border-color 0.2s ease, background-color 0.2s ease;
790 text-align: center;
791 }
792
793 /* Dropzone hover state */
794 .accua-file-dropzone:hover {
795 border-color: #999;
796 background-color: #f5f5f5;
797 }
798
799 /* Dropzone focus state - WCAG 2.2 AA requires visible focus indicator */
800 .accua-file-dropzone:focus,
801 .accua-file-dropzone-focused {
802 outline: 3px solid #005fcc;
803 outline-offset: 2px;
804 border-color: #005fcc;
805 }
806
807 /* Dropzone drag-over state */
808 .accua-file-dropzone-drag {
809 border-color: #005fcc;
810 background-color: #e8f4ff;
811 border-style: solid;
812 }
813
814 /* Dropzone text */
815 .accua-file-dropzone-text {
816 color: #666;
817 font-size: 0.95rem;
818 line-height: 1.5;
819 }
820
821 /* Dropzone icon */
822 .accua-file-dropzone-icon {
823 font-size: 1.5rem;
824 display: block;
825 margin-bottom: 0.5rem;
826 }
827
828 /* Browse button styling */
829 .accua-file-browse-btn {
830 color: #005fcc;
831 text-decoration: underline;
832 cursor: pointer;
833 font-weight: 500;
834 }
835
836 .accua-file-browse-btn:hover {
837 color: #003d99;
838 text-decoration: none;
839 }
840
841 /* Hide the native file input visually but keep it accessible */
842 .accua-file-upload-wrapper input[type="file"] {
843 position: absolute !important;
844 width: 1px !important;
845 height: 1px !important;
846 padding: 0 !important;
847 margin: -1px !important;
848 overflow: hidden !important;
849 clip: rect(0, 0, 0, 0) !important;
850 white-space: nowrap !important;
851 border: 0 !important;
852 opacity: 0 !important;
853 }
854
855 /* File list */
856 .accua-file-list {
857 margin-top: 0.75rem;
858 }
859
860 .accua-file-list-items {
861 list-style: none;
862 margin: 0;
863 padding: 0;
864 }
865
866 .accua-file-list-item {
867 display: flex;
868 align-items: center;
869 justify-content: space-between;
870 padding: 0.5rem 0.75rem;
871 margin-bottom: 0.25rem;
872 background-color: #f0f0f0;
873 font-size: 0.9rem;
874 }
875
876 .accua-file-info {
877 flex: 1;
878 min-width: 0;
879 overflow: hidden;
880 text-overflow: ellipsis;
881 white-space: nowrap;
882 color: #333;
883 }
884
885 /* Remove file button */
886 .accua-file-remove-btn {
887 flex-shrink: 0;
888 display: inline-flex;
889 align-items: center;
890 justify-content: center;
891 width: 24px;
892 height: 24px;
893 margin-left: 0.5rem;
894 padding: 0;
895 border: none;
896 border-radius: 50%;
897 background-color: #dc3545;
898 color: #fff;
899 font-size: 1rem;
900 line-height: 1;
901 cursor: pointer;
902 transition: background-color 0.2s ease;
903 }
904
905 .accua-file-remove-btn:hover {
906 background-color: #c82333;
907 }
908
909 .accua-file-remove-btn:focus {
910 outline: 3px solid #005fcc;
911 outline-offset: 2px;
912 }
913
914 /* Screen reader only text */
915 .accua-file-sr-announcement,
916 .screen-reader-text {
917 position: absolute;
918 width: 1px;
919 height: 1px;
920 padding: 0;
921 margin: -1px;
922 overflow: hidden;
923 clip: rect(0, 0, 0, 0);
924 white-space: nowrap;
925 border: 0;
926 }
927
928 /* File upload error display */
929 .accua-file-error {
930 margin-top: 0.5rem;
931 padding: 0.5rem 0.75rem;
932 background-color: #fef2f2;
933 border: 1px solid #dc3545;
934 color: #991b1b;
935 font-size: 0.875rem;
936 line-height: 1.4;
937 }
938
939 /* ============================================
940 Form Success/Error Message Container
941 ============================================ */
942
943 /* Anchor elements - invisible but provide scroll targets */
944 .accua-form-anchor {
945 display: block;
946 position: relative;
947 top: -1em;
948 /* Offset so message isn't hidden under fixed headers */
949 visibility: hidden;
950 height: 0;
951 }
952
953 /* Message container - appears above form after submission */
954 .accua-form-messages {
955 margin-bottom: 1.5em;
956 animation: accua-message-appear 0.4s ease-out;
957 }
958
959 /* Empty state - hide container completely */
960 .accua-form-messages:empty {
961 display: none;
962 margin: 0;
963 padding: 0;
964 }
965
966 /* Ensure content inside messages has reasonable typography */
967 .accua-form-messages h2,
968 .accua-form-messages h3 {
969 margin-top: 0;
970 margin-bottom: 0.5em;
971 }
972
973 .accua-form-messages p {
974 margin-bottom: 0.75em;
975 }
976
977 .accua-form-messages p:last-child {
978 margin-bottom: 0;
979 }
980
981 /* Smooth fade-in animation for message appearance */
982 @keyframes accua-message-appear {
983 0% {
984 opacity: 0;
985 transform: translateY(-0.5em);
986 }
987
988 100% {
989 opacity: 1;
990 transform: translateY(0);
991 }
992 }
993
994 /* Respect user preference for reduced motion */
995 @media (prefers-reduced-motion: reduce) {
996 .accua-form-messages {
997 animation: none;
998 }
999 }
1000
1001 .accua-file-error-item {
1002 display: block;
1003 }
1004
1005 .accua-file-error-item strong {
1006 font-weight: 600;
1007 }
1008
1009 /* Error state for dropzone when file error occurs */
1010 .accua-file-upload-wrapper.has-file-error .accua-file-dropzone {
1011 border-color: #dc3545;
1012 }
1013
1014 /* Floating label compatibility - ensure wrapper doesn't break floating label layout */
1015 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .accua-file-upload-wrapper {
1016 width: 100%;
1017 }
1018
1019 /* Remove default label float behavior for file inputs since we have custom dropzone */
1020 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper:has(.accua-file-upload-wrapper) .pfbc-label {
1021 position: static;
1022 transform: none;
1023 font-size: inherit;
1024 margin-bottom: 0.5rem;
1025 display: block;
1026 }
1027
1028 /* Error state for dropzone */
1029 .accua-file-upload-wrapper.has-error .accua-file-dropzone {
1030 border-color: #dc3545;
1031 background-color: #fff5f5;
1032 }
1033
1034 /* Admin form builder styles - match the admin theme */
1035 .wp-admin .accua-file-dropzone {
1036 background-color: #f6f7f7;
1037 border-color: #c3c4c7;
1038 }
1039
1040 .wp-admin .accua-file-dropzone:hover {
1041 border-color: #8c8f94;
1042 background-color: #f0f0f1;
1043 }
1044
1045 .wp-admin .accua-file-dropzone:focus,
1046 .wp-admin .accua-file-dropzone-focused {
1047 outline-color: #2271b1;
1048 border-color: #2271b1;
1049 }
1050
1051 .wp-admin .accua-file-dropzone-drag {
1052 border-color: #2271b1;
1053 background-color: #f0f7fc;
1054 }
1055
1056 .wp-admin .accua-file-browse-btn {
1057 color: #2271b1;
1058 }
1059
1060 .wp-admin .accua-file-browse-btn:hover {
1061 color: #135e96;
1062 }
1063
1064 /* ==========================================================================
1065 Validation Summary Area
1066 WCAG 2.2 AA / European Accessibility Act compliant
1067 ========================================================================== */
1068
1069 .pfbc-validation-summary {
1070 padding: 1em 1.25em;
1071 margin-top: 1em;
1072 border: 1px solid;
1073 font-size: 0.9375rem;
1074 line-height: 1.5;
1075 /* Smooth transitions between states (loading → success/error) */
1076 transition: background-color 0.25s ease-out,
1077 border-color 0.25s ease-out,
1078 color 0.25s ease-out,
1079 opacity 0.25s ease-out;
1080 }
1081
1082 /* Loading state - neutral blue color scheme */
1083 .pfbc-validation-loading {
1084 background-color: #eff6ff;
1085 border-color: #3b82f6;
1086 color: #1e40af;
1087 }
1088
1089 .pfbc-validation-loading .pfbc-summary-spinner {
1090 display: inline-block;
1091 width: 1em;
1092 height: 1em;
1093 border: 2px solid currentColor;
1094 border-right-color: transparent;
1095 border-radius: 50%;
1096 animation: accua-spinner-rotate 0.75s linear infinite;
1097 vertical-align: -0.125em;
1098 margin-right: 0.5em;
1099 }
1100
1101 .pfbc-validation-error {
1102 background-color: #fef2f2;
1103 border-color: #dc3545;
1104 color: #991b1b;
1105 }
1106
1107 .pfbc-validation-success {
1108 background-color: #f0fdf4;
1109 border-color: #22c55e;
1110 color: #166534;
1111 }
1112
1113 .pfbc-summary-icon {
1114 font-weight: bold;
1115 margin-right: 0.25em;
1116 }
1117
1118 .pfbc-summary-header {
1119 margin: 0 0 0.5em 0;
1120 font-weight: 600;
1121 font-size: 0.9375rem;
1122 }
1123
1124 .pfbc-summary-list {
1125 margin: 0;
1126 padding-left: 1.5em;
1127 list-style-type: disc;
1128 }
1129
1130 .pfbc-summary-list li {
1131 margin-bottom: 0.25em;
1132 font-size: 0.875rem;
1133 }
1134
1135 .pfbc-summary-list li:last-child {
1136 margin-bottom: 0;
1137 }
1138
1139 .pfbc-summary-link {
1140 color: inherit;
1141 text-decoration: underline;
1142 font-weight: 500;
1143 }
1144
1145 .pfbc-summary-link:hover,
1146 .pfbc-summary-link:focus {
1147 text-decoration: none;
1148 outline: 2px solid currentColor;
1149 outline-offset: 2px;
1150 }
1151
1152 /* Respect user preference for reduced motion (EAA compliance) */
1153 @media (prefers-reduced-motion: reduce) {
1154 .pfbc-validation-summary {
1155 transition: none;
1156 }
1157
1158 .pfbc-validation-loading .pfbc-summary-spinner {
1159 animation: none;
1160 /* Show static spinner for users who prefer no motion */
1161 border-right-color: currentColor;
1162 opacity: 0.5;
1163 }
1164 }
1165
1166 /* ============================================
1167 Post Select - Searchable Dropdown
1168 WCAG 2.2 AA / European Accessibility Act compliant
1169 @since 2.0.0-beta.29
1170 ============================================ */
1171
1172 /* Wrapper - contains both native select (pre-JS) and custom UI (post-JS) */
1173 .pfbc-post-select-wrapper {
1174 position: relative;
1175 width: 100%;
1176 }
1177
1178 /* Native select BEFORE JS enhancement - styled like regular select for no flash */
1179 .pfbc-post-select-wrapper[data-enhanced="false"]>select {
1180 /* Use native select appearance initially - matches other selects */
1181 width: 100%;
1182 display: block;
1183 }
1184
1185 /* Hide native select AFTER JS enhancement runs - keep accessible for form submission */
1186 .pfbc-post-select-wrapper[data-enhanced="true"]>select {
1187 position: absolute;
1188 inset: 0;
1189 width: 100%;
1190 height: 100%;
1191 opacity: 0;
1192 pointer-events: none;
1193 display: block;
1194 }
1195
1196 /* Container for custom dropdown */
1197 .pfbc-post-select-container {
1198 position: relative;
1199 width: 100%;
1200 }
1201
1202 /* Trigger button - matches standard select styling */
1203 .pfbc-post-select-trigger {
1204 display: flex;
1205 align-items: center;
1206 justify-content: space-between;
1207 width: 100%;
1208 padding: 0.5em 0.75em;
1209 padding-right: 2.5em;
1210 font-size: 1rem;
1211 line-height: 1.4;
1212 color: inherit;
1213 background-color: #fff;
1214 border: 1px solid;
1215 border-color: inherit;
1216 border-radius: 0;
1217 cursor: pointer;
1218 text-align: left;
1219 box-sizing: border-box;
1220 font-family: inherit;
1221 appearance: none;
1222 -webkit-appearance: none;
1223 position: relative;
1224 }
1225
1226 .pfbc-post-select-trigger:hover {
1227 border-color: #888;
1228 }
1229
1230 .pfbc-post-select-trigger:focus {
1231 outline: 2px solid #0073aa;
1232 outline-offset: -2px;
1233 }
1234
1235 /* Invalid state for validation errors */
1236 .pfbc-post-select-trigger.pfbc-invalid {
1237 border-color: #c00;
1238 }
1239
1240 /* Arrow indicator */
1241 .pfbc-post-select-arrow {
1242 position: absolute;
1243 right: 12px;
1244 top: 50%;
1245 transform: translateY(-50%);
1246 width: 0;
1247 height: 0;
1248 border-left: 5px solid transparent;
1249 border-right: 5px solid transparent;
1250 border-top: 5px solid currentColor;
1251 pointer-events: none;
1252 }
1253
1254 .pfbc-post-select-container.open .pfbc-post-select-arrow {
1255 border-top: none;
1256 border-bottom: 5px solid currentColor;
1257 }
1258
1259 /* Display text */
1260 .pfbc-post-select-text {
1261 flex: 1;
1262 overflow: hidden;
1263 text-overflow: ellipsis;
1264 white-space: nowrap;
1265 }
1266
1267 /* Dropdown panel */
1268 .pfbc-post-select-dropdown {
1269 position: absolute;
1270 top: 100%;
1271 left: 0;
1272 right: 0;
1273 z-index: 9999;
1274 background: #fff;
1275 border: 1px solid;
1276 border-color: inherit;
1277 border-top: none;
1278 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
1279 max-height: 300px;
1280 display: flex;
1281 flex-direction: column;
1282 }
1283
1284 /* Search input container */
1285 .pfbc-post-select-search {
1286 padding: 0.5em;
1287 border-bottom: 1px solid #eee;
1288 background: #fafafa;
1289 }
1290
1291 .pfbc-post-select-search-input {
1292 width: 100%;
1293 padding: 0.5em 0.75em;
1294 font-size: 0.9375rem;
1295 line-height: 1.4;
1296 border: 1px solid #ccc;
1297 border-radius: 0;
1298 box-sizing: border-box;
1299 font-family: inherit;
1300 background-color: #fff;
1301 color: inherit;
1302 }
1303
1304 .pfbc-post-select-search-input::placeholder {
1305 color: #999;
1306 }
1307
1308 .pfbc-post-select-search-input:focus {
1309 outline: 2px solid #0073aa;
1310 outline-offset: -2px;
1311 border-color: #ccc;
1312 }
1313
1314 /* Options list */
1315 .pfbc-post-select-options {
1316 list-style: none;
1317 margin: 0;
1318 padding: 0;
1319 overflow-y: auto;
1320 max-height: 220px;
1321 flex: 1;
1322 }
1323
1324 /* Individual option */
1325 .pfbc-post-select-option {
1326 padding: 0.5em 0.75em;
1327 cursor: pointer;
1328 font-size: 1rem;
1329 line-height: 1.4;
1330 }
1331
1332 .pfbc-post-select-option:hover,
1333 .pfbc-post-select-option.highlighted {
1334 background-color: #f0f0f0;
1335 }
1336
1337 .pfbc-post-select-option.selected {
1338 background-color: #0073aa;
1339 color: #fff;
1340 }
1341
1342 .pfbc-post-select-option.selected:hover,
1343 .pfbc-post-select-option.selected.highlighted {
1344 background-color: #005a87;
1345 }
1346
1347 /* No results message */
1348 .pfbc-post-select-no-results {
1349 padding: 1em;
1350 text-align: center;
1351 color: #666;
1352 font-style: italic;
1353 }
1354
1355 /* Loading indicator */
1356 .pfbc-post-select-loading {
1357 padding: 0.75em;
1358 text-align: center;
1359 color: #666;
1360 font-size: 0.875rem;
1361 background: #f9f9f9;
1362 border-top: 1px solid #eee;
1363 }
1364
1365 .pfbc-post-select-loading::before {
1366 content: '';
1367 display: inline-block;
1368 width: 1em;
1369 height: 1em;
1370 border: 2px solid currentColor;
1371 border-right-color: transparent;
1372 border-radius: 50%;
1373 animation: accua-spinner-rotate 0.75s linear infinite;
1374 vertical-align: -0.125em;
1375 margin-right: 0.5em;
1376 }
1377
1378 /* Screen reader only - live region */
1379 .pfbc-post-select-live-region {
1380 position: absolute;
1381 width: 1px;
1382 height: 1px;
1383 padding: 0;
1384 margin: -1px;
1385 overflow: hidden;
1386 clip: rect(0, 0, 0, 0);
1387 white-space: nowrap;
1388 border: 0;
1389 }
1390
1391 /* Focus visible for keyboard users */
1392 .pfbc-post-select-option:focus-visible {
1393 outline: 2px solid #0073aa;
1394 outline-offset: -2px;
1395 }
1396
1397 /* High contrast mode support.
1398 'more' is the standard value; 'high' is kept for older WebKit. */
1399 @media (prefers-contrast: more), (prefers-contrast: high) {
1400 .pfbc-post-select-trigger {
1401 border-width: 2px;
1402 }
1403
1404 .pfbc-post-select-dropdown {
1405 border-width: 2px;
1406 }
1407
1408 .pfbc-post-select-option.highlighted {
1409 outline: 2px solid currentColor;
1410 }
1411 }
1412
1413 /* Reduced motion support */
1414 @media (prefers-reduced-motion: reduce) {
1415 .pfbc-post-select-loading::before {
1416 animation: none;
1417 border-right-color: currentColor;
1418 opacity: 0.5;
1419 }
1420 }
1421
1422 /* ============================================
1423 Post Select - Inline Label Mode (Floating Labels)
1424 Material Design inspired integration
1425 ============================================ */
1426
1427 /* Trigger button styling for inline label mode - matches .pfbc-select */
1428 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-post-select-trigger {
1429 /* Match the padding from .pfbc-select in inline mode */
1430 padding: 1em 0.75em 0.85em 0.75em;
1431 padding-right: 2.5em;
1432 font-size: 1rem;
1433 line-height: 1.2;
1434 width: 100%;
1435 box-sizing: border-box;
1436 /* Override flex display to block for consistent height calculation */
1437 display: block;
1438 text-align: left;
1439 /* Ensure consistent border styling */
1440 border: 1px solid;
1441 border-color: inherit;
1442 }
1443
1444 /* Text span needs inline-block to maintain height when empty */
1445 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-post-select-text {
1446 display: inline-block;
1447 min-height: 1.2em;
1448 /* Match line-height to ensure consistent height when empty */
1449 vertical-align: middle;
1450 }
1451
1452 /* Arrow styling for inline labels - use SVG instead of CSS triangle */
1453 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-post-select-arrow {
1454 right: 12px;
1455 top: 50%;
1456 width: 12px;
1457 height: 12px;
1458 border: none;
1459 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
1460 background-repeat: no-repeat;
1461 background-position: center;
1462 background-size: 100%;
1463 }
1464
1465 /* Post-select uses same floating label behavior as regular select:
1466 - Label inside field when empty
1467 - Label floats to border when has value or focused
1468 No special CSS needed - inherits from .pfbc-inline-label-wrapper.has-value rules */
1469
1470 /* Container must not have margins that would shift the label */
1471 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-post-select-container {
1472 width: 100%;
1473 }
1474
1475 /* Ensure wrapper is properly positioned */
1476 .accua-form-view-inlinelabel .pfbc-inline-label-wrapper .pfbc-post-select-wrapper {
1477 width: 100%;
1478 display: block;
1479 }
1480
1481 /* ============================================
1482 Post Select - Standard Label Mode (Labels on Top)
1483 ============================================ */
1484
1485 .accua-form-view-standard .pfbc-post-select-wrapper {
1486 width: 100%;
1487 }
1488
1489 .accua-form-view-standard .pfbc-post-select-trigger {
1490 width: 100%;
1491 }
1492
1493 /* ============================================
1494 Post Select - Sidebyside Label Mode (Labels on Left)
1495 ============================================ */
1496
1497 .accua-form-view-sidebyside .pfbc-post-select-wrapper {
1498 width: 100%;
1499 }
1500
1501 .accua-form-view-sidebyside .pfbc-post-select-trigger {
1502 width: 100%;
1503 }
1504
1505 /* ============================================
1506 Post Select - Inline Form Mode
1507 ============================================ */
1508
1509 .accua-form-view-inline .pfbc-post-select-trigger {
1510 width: auto;
1511 min-width: 200px;
1512 }
1513
1514 /* ============================================
1515 Turnstile CAPTCHA
1516 ============================================ */
1517
1518 .cf-turnstile iframe {
1519 border: none;
1520 }