/*
 * Advanced COD Engine — Flatsome compatibility layer.
 *
 * Loaded only when Flatsome is the active theme. Neutralizes
 * Flatsome's global element styling inside the COD form, the
 * confirmation page and published landing pages. Purely additive:
 * nothing in the theme is modified.
 */

/* Keep our form controls inside Flatsome layouts. */
body.woocommerce .ace-cod-form input[type="text"],
body.woocommerce .ace-cod-form input[type="tel"],
body.woocommerce .ace-cod-form input[type="number"],
body.woocommerce .ace-cod-form select,
body.woocommerce .ace-cod-form textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.55rem 0.65rem;
	margin: 0;
	background-color: #fff;
	color: #1d2327;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-shadow: none;
	line-height: 1.4;
	-webkit-appearance: none;
	-moz-appearance: none;
}

body.woocommerce .ace-cod-form select {
	background-image: none;
	padding-right: 0.65rem;
}

body.woocommerce .ace-cod-form label {
	display: block;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	margin: 0;
}

/* Flatsome buttons are styled globally — keep our CTA consistent. */
body.woocommerce .ace-cod-form__submit,
body.woocommerce .ace-confirm__whatsapp-btn {
	text-transform: none;
	letter-spacing: normal;
	line-height: 1.3;
	box-shadow: none;
}

/* Confirmation page sits inside Flatsome's #main — give it room. */
body.woocommerce .ace-confirm {
	margin-left: auto;
	margin-right: auto;
}

body.woocommerce .ace-confirm__table td {
	border-color: #f0f0f0;
}

/* Landing pages rendered via our template inherit Flatsome typography;
   constrain section width so long copy stays readable. */
.ace-landing__section {
	width: 100%;
}

.ace-landing__section--cod_form .ace-cod-form {
	margin-left: auto;
	margin-right: auto;
}

/* Flatsome dark header variants could wash out totals block. */
.ace-cod-form__totals {
	color: #1d2327;
}
