/*!
 * TD Checkout Fields — storefront styles: structure only, fonts and colours come from the theme.
 */

.tdcf-hidden { display: none !important; }
.tdcf-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* sections of the classic checkout */
.tdcf-section { clear: both; margin: 0 0 1.5em; }
.tdcf-section::after { content: ""; display: table; clear: both; }
.tdcf-section-title { clear: both; }
.tdcf-section-subtitle, .tdcf-subtitle { opacity: .8; margin-top: 0; }
.form-row.tdcf-field-heading, .form-row.tdcf-field-label, .form-row.tdcf-field-paragraph { clear: both; }

/* option lists */
.tdcf-field-radio .woocommerce-input-wrapper label.radio,
.tdcf-checkboxgroup .tdcf-option { display: inline-flex; align-items: center; gap: .35em; margin: 0 1.2em .35em 0; width: auto; font-weight: inherit; }
.tdcf-field-radio .woocommerce-input-wrapper input.input-radio { margin: 0 .35em 0 0; }
.tdcf-checkboxgroup { display: block; }
.tdcf-checkboxgroup .tdcf-option-block { display: flex; }
.theme-twentytwentyfive .tdcf-field-radio .woocommerce-input-wrapper,
.theme-twentytwentyfour .tdcf-field-radio .woocommerce-input-wrapper { display: flex; flex-wrap: wrap; align-items: center; }
.tdcf-price { white-space: nowrap; opacity: .85; }

/* file upload */
.tdcf-file { display: block; }
.tdcf-file-list { display: block; margin-top: .4em; font-size: .92em; }
.tdcf-file-item { display: inline-flex; align-items: center; gap: .4em; padding: .15em .2em .15em .6em; border: 1px solid currentColor; border-radius: 3px; border-color: rgba(127, 127, 127, .45); }
.tdcf-file-remove { appearance: none; background: transparent; border: 0; color: inherit; cursor: pointer; font-size: 1.2em; line-height: 1; padding: 0 .35em; }
.tdcf-file.is-uploading .tdcf-file-list { opacity: .7; }
.tdcf-file-button { cursor: pointer; display: inline-block; }

/* inline validation */
.tdcf-error { display: block; margin-top: .3em; font-size: .9em; color: var(--tdcf-error-color, #b32d2e); }

/* block checkout */
.tdcf-section .tdcf-fields { display: flex; flex-direction: column; gap: 16px; }
.wp-block-woocommerce-checkout-contact-information-block .tdcf-section { margin-top: 16px; }
.tdcf-block-field .tdcf-control { margin-top: 0; }
.tdcf-block-field .tdcf-label, .tdcf-block-field .tdcf-legend { display: block; margin-bottom: 6px; font-size: .875em; }
.tdcf-block-field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; background: none; }
.tdcf-block-field .tdcf-legend { padding: 0; margin-left: 0; margin-right: 0; font-weight: inherit; }
.tdcf-block-field .wc-block-components-textarea { width: 100%; box-sizing: border-box; }
.tdcf-block-field .tdcf-description { margin: 6px 0 0; font-size: .875em; opacity: .8; }
.tdcf-block-field .wc-block-components-radio-control { margin: 0; }
.tdcf-html .tdcf-title { margin: 0; }
.tdcf-html .tdcf-subtitle { margin: .25em 0 0; }

/* date picker (jQuery UI, no theme stylesheet): neutral popup */
.tdcf-ui-datepicker.ui-datepicker { display: none; z-index: 100000 !important; padding: .5em; width: auto; min-width: 17em; background: var(--tdcf-popup-bg, Canvas); color: var(--tdcf-popup-color, CanvasText); border: 1px solid rgba(127, 127, 127, .35); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); font-size: .9em; }
.tdcf-ui-datepicker .ui-datepicker-header { position: relative; display: flex; align-items: center; justify-content: center; gap: .3em; padding: .3em 2em; font-weight: 600; }
.tdcf-ui-datepicker .ui-datepicker-prev, .tdcf-ui-datepicker .ui-datepicker-next { position: absolute; top: .3em; cursor: pointer; color: inherit; text-decoration: none; }
.tdcf-ui-datepicker .ui-datepicker-prev { left: .3em; }
.tdcf-ui-datepicker .ui-datepicker-next { right: .3em; }
.tdcf-ui-datepicker .ui-datepicker-prev span, .tdcf-ui-datepicker .ui-datepicker-next span { font-size: 0; }
.tdcf-ui-datepicker .ui-datepicker-prev::before { content: "\2039"; font-size: 1.4em; }
.tdcf-ui-datepicker .ui-datepicker-next::before { content: "\203A"; font-size: 1.4em; }
.tdcf-ui-datepicker .ui-datepicker-title select { width: auto; padding: .1em .3em; font-size: inherit; }
.tdcf-ui-datepicker table { width: 100%; margin: 0; border-collapse: collapse; }
.tdcf-ui-datepicker th, .tdcf-ui-datepicker td { padding: 1px; text-align: center; border: 0; background: none; }
.tdcf-ui-datepicker td a, .tdcf-ui-datepicker td span { display: block; padding: .35em; border-radius: 4px; color: inherit; text-decoration: none; }
.tdcf-ui-datepicker td a:hover, .tdcf-ui-datepicker td a:focus { background: rgba(127, 127, 127, .18); }
.tdcf-ui-datepicker .ui-state-active { outline: 2px solid currentColor; outline-offset: -2px; font-weight: 700; }
.tdcf-ui-datepicker .ui-state-disabled span, .tdcf-ui-datepicker .ui-datepicker-unselectable span { opacity: .35; }
.tdcf-ui-datepicker .ui-datepicker-group { display: inline-block; vertical-align: top; padding: 0 .3em; }
.tdcf-ui-datepicker .ui-datepicker-row-break { clear: both; }

/* orders */
.woocommerce-table--custom-fields th.tdcf-section-title { font-size: 1.05em; }
.tdcf-current-file { margin-top: -.5em; font-size: .9em; }

/* checkout block editor preview */
.tdcf-editor-fields { display: grid; gap: 8px; }
.tdcf-editor-field { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid rgba(127, 127, 127, .45); border-radius: 4px; }
.tdcf-editor-type { opacity: .6; font-size: .85em; }
.tdcf-editor-title { margin: 4px 0; font-weight: 600; }
