PluginProbe
Contact Forms by Cimatti / 2.2.0
Contact Forms by Cimatti v2.2.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.2.0, at assets/css/frontend.css

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