.custom-email-style {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  outline: 0;
  line-height: normal;
  font-size: var(--wp--preset--font-size--small);
  padding: 0.9rem 1.1rem;
}
.custom-phone-style {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  outline: 0;
  line-height: normal;
  font-size: var(--wp--preset--font-size--small);
  padding: 0.9rem 1.1rem;
}
.wc-block-components-address-form__country.wc-block-components-country-input {
  margin-top: 12px !important;
}
.wc-block-components-radio-input {
  width: 100%;
}
#custom-file-style {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0.9rem 1.1rem;
  font-size: var(--wp--preset--font-size--small);
  line-height: normal;
  border: 1px solid rgb(118, 118, 118); /* Light-dark border color */
  border-radius: 2px;
  cursor: pointer;
}

.custom-checkbox-style {
  padding-top: 10px;
}

/* Custom styles for checkbox fields */
.custom-checkbox-field {
  margin-bottom: 20px;
}

.custom-checkbox .jwcfe-price-field {
  margin-right: 10px;
  cursor: pointer;
}
/* .select2-container {
    border-color: var(--wc-red);
    border: 2px solid red;
} */
.custom-select-validation {
  border: 1px solid #ccc; /* Default border */
}

.custom-td {
  text-align: justify !important;
}

.custom-th {
  font-weight: 700 !important;
  width: 54%;
}
.custom-select-validation.invalid {
  border: 1px solid red; /* Red border when invalid */
}
.custom-checkbox-wrapper {
  display: flex;
  align-items: center;
  padding: 10px 0;
}
.main-check {
  margin-bottom: 0px;
}
.custom-checkbox label {
  margin-left: 10px;
  font-size: 16px;
  font-weight: 600;
}

.jwcfe-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}

.jwcfe-checkbox-label input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
  margin-right: 5px;
}

.custom-checkbox .required {
  margin-left: 5px;
  color: yellow; /* Customize the color of the required asterisk */
}

.custom-checkbox input[type="checkbox"]:checked + label {
  color: #0073aa; /* Change color when checkbox is checked */
}

.custom-radio-container .custom-radio-wrapper {
  display: flex;
  column-gap: 0.8em;
}
.custom-radio-value {
  margin-top: 14px;
}

.custom-radio-container .custom-radio-wrapper {
  display: flex;
  column-gap: 0.8em;
}
.custom-radio-value {
  margin-top: 14px;
}
/* Block checkout: radio fields register as select; we replace the UI with radios */
.wc-blocks-components-select.jwcfe-radio-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wc-blocks-components-select.jwcfe-radio-field .wc-blocks-components-select__label {
  position: static !important;
  transform: none !important;
  left: auto !important;
  top: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  clip: auto !important;
  clip-path: none !important;
  height: auto !important;
  width: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  display: block;
  order: 1;
}

.wc-blocks-components-select.jwcfe-radio-field .jwcfe-radio-replacement {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  align-items: flex-start;
  width: 100%;
}

.wc-blocks-components-select.jwcfe-radio-field .wc-blocks-components-select__container.jwcfe-select-container--converted {
  order: 3;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  background: transparent !important;
  min-height: 0 !important;
}

.wc-blocks-components-select.jwcfe-radio-field .wc-blocks-components-select__expand {
  display: none !important;
}

.jwcfe-radio-replacement .jwcfe-radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.jwcfe-radio-replacement input[type="radio"] {
  width: 1.125em;
  height: 1.125em;
  margin: 0;
  flex: 0 0 auto;
}

.jwcfe-radio-replacement .jwcfe-radio-label-text {
  line-height: 1.4;
  display: inline-block;
}

/* Description / Help Text below block checkout fields */
.jwcfe-field-description {
  display: block;
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: 0.875em;
  line-height: 1.45;
  color: #646970;
  width: 100%;
  clear: both;
}

.wc-blocks-components-select.jwcfe-radio-field .jwcfe-field-description {
  order: 3;
  margin-top: 0.25rem;
}

.form-row > label > abbr + span {
  display: none;
}

/* Keep native select in DOM for React/validation; hide visually */
.jwcfe-hidden-select {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
}

/* ==========================================================================
   Block Checkout: extra field types (textarea, heading, paragraph)
   ========================================================================== */

/* Heading / Paragraph are display-only: hide the anchor input WooCommerce renders. */
.wc-block-components-text-input:has(input[data-jwcfe-type="heading"]),
.wc-block-components-text-input:has(input[data-jwcfe-type="paragraph"]) {
	display: none !important;
}

.wc-block-checkout .jwcfe-block-heading,
.wc-block-components-address-form .jwcfe-block-heading {
	flex: 0 0 100%;
	width: 100%;
	margin: 16px 0 4px;
	line-height: 1.3;
}

.wc-block-checkout .jwcfe-block-paragraph {
	flex: 0 0 100%;
	width: 100%;
	margin: 12px 0 0;
	font-size: 0.9em;
	line-height: 1.6;
}
.wc-block-checkout .jwcfe-block-paragraph > :first-child { margin-top: 0; }
.wc-block-checkout .jwcfe-block-paragraph > :last-child { margin-bottom: 0; }

/* Textarea: the original input stays (hidden) as the value holder. */
.wc-block-components-text-input input[data-jwcfe-type="textarea"] {
	position: absolute !important;
	opacity: 0 !important;
	pointer-events: none !important;
	height: 1px !important;
	width: 1px !important;
	padding: 0 !important;
	border: 0 !important;
}
.wc-block-components-text-input:has(> textarea.jwcfe-block-textarea) {
	position: relative;
}
.wc-block-components-text-input:has(> textarea.jwcfe-block-textarea) > label {
	top: 7px !important;
	transform: scale(0.875) !important;
	transform-origin: left top;
	pointer-events: none;
}
.wc-block-components-text-input textarea.jwcfe-block-textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 6em;
	margin: 0;
	padding: 1.6em 0.75em 0.5em;
	font: inherit;
	font-size: 1em;
	line-height: 1.5;
	color: inherit;
	background: #fff;
	border: 1px solid hsla(0, 0%, 7%, 0.8);
	border-radius: 4px;
	resize: vertical;
	box-shadow: none;
}
.wc-block-components-text-input textarea.jwcfe-block-textarea:focus {
	outline: none;
	border-color: currentColor;
	box-shadow: inset 0 0 0 1px currentColor;
}
.wc-block-components-text-input textarea.jwcfe-block-textarea.has-error,
.wc-block-components-text-input.has-error textarea.jwcfe-block-textarea {
	border-color: #cc1818;
	box-shadow: inset 0 0 0 1px #cc1818;
}
