/**
 * EasyCart - Flexible WooCommerce Checkout for Elementor
 * Frontend Styles
 *
 * @package EasyCart
 */

:root {
	--ec-primary: #2563eb;
	--ec-primary-hover: #1d4ed8;
	--ec-primary-light: #eff6ff;
	--ec-text: #0f172a;
	--ec-text-muted: #64748b;
	--ec-text-light: #94a3b8;
	--ec-border: #e2e8f0;
	--ec-border-focus: #3b82f6;
	--ec-bg-surface: #ffffff;
	--ec-bg-subtle: #f8fafc;
	--ec-bg-badge: #f1f5f9;
	--ec-success: #10b981;
	--ec-success-bg: #ecfdf5;
	--ec-error: #ef4444;
	--ec-error-bg: #fef2f2;
	--ec-warning: #f59e0b;
	--ec-radius: 12px;
	--ec-radius-sm: 8px;
	--ec-radius-full: 9999px;
	--ec-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--ec-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	--ec-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
	--ec-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.easycart-wrapper {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	box-sizing: border-box;
	font-family: inherit;
	color: var(--ec-text);
}

.easycart-wrapper *,
.easycart-wrapper *::before,
.easycart-wrapper *::after {
	box-sizing: border-box;
}

/* Layout Grid */
.easycart-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: flex-start;
}

.easycart-col-left {
	flex: 1 1 58%;
	min-width: 0;
}

.easycart-col-right {
	flex: 1 1 38%;
	min-width: 320px;
}

@media (min-width: 992px) {
	.easycart-sticky {
		position: sticky;
		top: 24px;
	}
}

@media (max-width: 991px) {
	.easycart-layout {
		flex-direction: column;
		gap: 24px;
	}
	.easycart-col-left,
	.easycart-col-right {
		flex: 1 1 100%;
		width: 100%;
		min-width: 100%;
	}
}

/* Section styling */
.easycart-section {
	background: var(--ec-bg-surface);
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-radius);
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: var(--ec-shadow-sm);
}

.easycart-section-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--ec-text);
	margin: 0 0 20px 0;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ec-border);
	display: flex;
	align-items: center;
	gap: 10px;
}

.easycart-title-icon {
	color: var(--ec-primary);
	font-size: 20px;
	display: inline-flex;
	align-items: center;
}

/* Product Cards Container */
.easycart-products-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.easycart-products-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

@media (max-width: 640px) {
	.easycart-products-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Product Card */
.easycart-product-card {
	background: var(--ec-bg-surface);
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-radius);
	padding: 18px;
	transition: var(--ec-transition);
	position: relative;
}

.easycart-product-card:hover {
	border-color: #cbd5e1;
	box-shadow: var(--ec-shadow-md);
}

.easycart-product-card.selected {
	border-color: var(--ec-primary);
	background: linear-gradient(to bottom, #ffffff, #fafcff);
}

.easycart-card-header {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

/* Custom Checkbox Toggle */
.easycart-select-toggle {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	margin-top: 2px;
}

.easycart-select-toggle input {
	display: none;
}

.easycart-checkbox-mark {
	width: 20px;
	height: 20px;
	border: 2px solid var(--ec-border);
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: var(--ec-transition);
	background: #ffffff;
}

.easycart-select-toggle input:checked + .easycart-checkbox-mark {
	background-color: var(--ec-primary);
	border-color: var(--ec-primary);
}

.easycart-select-toggle input:checked + .easycart-checkbox-mark::after {
	content: '';
	width: 5px;
	height: 10px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	margin-bottom: 2px;
}

/* Custom Radio Toggle (Single choice mode) */
.easycart-radio-mark {
	width: 20px;
	height: 20px;
	border: 2px solid var(--ec-border);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: var(--ec-transition);
	background: #ffffff;
}

.easycart-select-toggle input[type="radio"]:checked + .easycart-radio-mark {
	border-color: var(--ec-primary);
	background-color: #ffffff;
}

.easycart-select-toggle input[type="radio"]:checked + .easycart-radio-mark::after {
	content: '';
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: var(--ec-primary);
	animation: ecRadioPop 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ecRadioPop {
	0% {
		transform: scale(0);
	}
	100% {
		transform: scale(1);
	}
}

/* Product Thumbnail */
.easycart-product-media {
	flex-shrink: 0;
}

.easycart-product-thumbnail {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: var(--ec-radius-sm);
	border: 1px solid var(--ec-border);
	display: block;
}

.easycart-product-info {
	flex: 1;
	min-width: 0;
}

.easycart-product-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 6px 0;
	color: var(--ec-text);
	line-height: 1.35;
}

.easycart-product-description {
	font-size: 13px;
	color: var(--ec-text-muted);
	line-height: 1.4;
	margin-bottom: 8px;
}

.easycart-product-meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.easycart-product-price {
	font-size: 16px;
	font-weight: 700;
	color: var(--ec-text);
}

.easycart-product-price del {
	font-size: 13px;
	color: var(--ec-text-light);
	font-weight: 400;
	margin-right: 4px;
}

.easycart-product-price ins {
	text-decoration: none;
	color: var(--ec-primary);
}

/* Discount Percentage Badge */
.easycart-discount-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: #ef4444;
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	padding: 2px 7px;
	border-radius: var(--ec-radius-full);
	line-height: 1.2;
	letter-spacing: 0.02em;
	transition: var(--ec-transition);
}


/* Stock Badges */
.easycart-stock {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 3px 8px;
	border-radius: var(--ec-radius-full);
}

.easycart-stock.in-stock {
	background-color: var(--ec-success-bg);
	color: var(--ec-success);
}

.easycart-stock.out-of-stock {
	background-color: var(--ec-error-bg);
	color: var(--ec-error);
}

.easycart-stock.low-stock {
	background-color: #fffbeb;
	color: var(--ec-warning);
}

.easycart-product-sku {
	font-size: 12px;
	color: var(--ec-text-light);
}

/* Variation Selectors */
.easycart-product-variations {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--ec-border);
}

.easycart-attr-group {
	margin-bottom: 10px;
}

.easycart-attr-group:last-child {
	margin-bottom: 0;
}

.easycart-attr-header {
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 6px;
	display: flex;
	gap: 6px;
}

.easycart-attr-label {
	color: var(--ec-text-muted);
}

.easycart-attr-current-label {
	color: var(--ec-text);
	text-transform: capitalize;
}

.easycart-pills-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.easycart-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: var(--ec-bg-surface);
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-radius-sm);
	font-size: 13px;
	font-weight: 500;
	color: var(--ec-text);
	cursor: pointer;
	transition: var(--ec-transition);
	user-select: none;
}

.easycart-pill:hover {
	border-color: var(--ec-primary);
	background: var(--ec-bg-subtle);
}

.easycart-pill.active {
	border-color: var(--ec-primary);
	background-color: var(--ec-primary-light);
	color: var(--ec-primary);
	font-weight: 600;
}

.easycart-color-circle {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.15);
	flex-shrink: 0;
}

/* Premium Quantity Stepper */
.easycart-product-footer {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed var(--ec-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.easycart-qty-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--ec-text-muted);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	user-select: none;
}

.easycart-quantity-stepper {
	display: inline-flex;
	align-items: center;
	background: #f8fafc;
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-radius-sm);
	padding: 3px;
	box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05), inset 0 1px 1px 0 rgba(255, 255, 255, 0.6);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	position: relative;
}

.easycart-quantity-stepper:hover {
	border-color: #cbd5e1;
	box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.08), 0 1px 3px -1px rgba(15, 23, 42, 0.04);
}

.easycart-quantity-stepper:focus-within {
	border-color: var(--ec-border-focus);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.easycart-qty-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.04);
	background: #ffffff;
	color: var(--ec-text);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.06);
	transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
	outline: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.easycart-qty-btn svg,
.easycart-qty-icon {
	width: 11px;
	height: 11px;
	stroke: currentColor;
	stroke-width: 2.5;
	transition: transform 0.18s ease;
	display: block;
}

.easycart-qty-btn:hover:not(.is-disabled) {
	background-color: var(--ec-primary);
	color: #ffffff;
	border-color: var(--ec-primary);
	box-shadow: 0 3px 8px -1px rgba(37, 99, 235, 0.35);
	transform: scale(1.08);
}

.easycart-qty-btn:hover:not(.is-disabled) svg {
	transform: scale(1.1);
}

.easycart-qty-btn:active:not(.is-disabled) {
	transform: scale(0.92);
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.easycart-qty-btn.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
	background-color: transparent;
	box-shadow: none;
	border-color: transparent;
}

.easycart-qty-input {
	width: 38px;
	height: 28px;
	border: none;
	background: transparent;
	text-align: center;
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	color: var(--ec-text);
	font-variant-numeric: tabular-nums;
	-moz-appearance: textfield;
	padding: 0;
	margin: 0 2px;
	outline: none;
	cursor: default;
	user-select: none;
	transition: color 0.15s ease, transform 0.15s ease;
}

.easycart-qty-input::-webkit-outer-spin-button,
.easycart-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Micro-animation when quantity updates */
.easycart-qty-input.ec-bump {
	animation: ecQtyBump 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ecQtyBump {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.24);
		color: var(--ec-primary);
	}
	100% {
		transform: scale(1);
	}
}

/* ==========================================================================
   Responsive Product Card Layout:
   - PC / Desktop (>= 768px): Quantity stepper sits on the right of Name & Price
     saving significant vertical screen height.
   - Mobile (< 768px): Quantity stepper stays at bottom (full-width footer), 
     exactly as currently designed.
   ========================================================================== */
@media (min-width: 768px) {
	.easycart-product-card {
		display: grid;
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"header qty"
			"variations variations";
		align-items: center;
		column-gap: 20px;
		row-gap: 12px;
	}

	.easycart-card-header {
		grid-area: header;
		min-width: 0;
	}

	.easycart-product-footer {
		grid-area: qty;
		margin-top: 0 !important;
		padding-top: 0 !important;
		border-top: none !important;
		align-self: center;
		justify-content: flex-end;
		gap: 10px;
		flex-shrink: 0;
	}

	.easycart-qty-label {
		display: none !important;
	}

	.easycart-product-variations {
		grid-area: variations;
		margin-top: 6px;
		padding-top: 12px;
		border-top: 1px dashed var(--ec-border);
	}

	/* If grid is 3 or 4 columns (very narrow cards), stack vertically */
	.easycart-products-grid[style*="repeat(3"] .easycart-product-card,
	.easycart-products-grid[style*="repeat(4"] .easycart-product-card {
		display: flex;
		flex-direction: column;
	}

	.easycart-products-grid[style*="repeat(3"] .easycart-product-card .easycart-product-footer,
	.easycart-products-grid[style*="repeat(4"] .easycart-product-card .easycart-product-footer {
		margin-top: 14px !important;
		padding-top: 12px !important;
		border-top: 1px dashed var(--ec-border) !important;
		justify-content: space-between;
	}
}

/* Customer Fields Form Grid */
.easycart-fields-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.easycart-fields-grid .form-row-wide {
	grid-column: span 2;
}

.easycart-fields-grid .form-row-first {
	grid-column: 1;
}

.easycart-fields-grid .form-row-last {
	grid-column: 2;
}

@media (max-width: 640px) {
	.easycart-fields-grid {
		grid-template-columns: 1fr;
	}
	.easycart-fields-grid .form-row-first,
	.easycart-fields-grid .form-row-last {
		grid-column: 1;
	}
}

.easycart-field {
	margin-bottom: 0 !important;
}

.easycart-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--ec-text);
	margin-bottom: 6px;
}

.easycart-field .required {
	color: var(--ec-error);
	text-decoration: none;
}

/* Show / Hide Field Labels Feature */
.easycart-hide-labels label,
.easycart-hide-labels .easycart-field > label,
.easycart-hide-labels .woocommerce-billing-fields__field-wrapper label,
.easycart-hide-labels .woocommerce-input-wrapper > label,
.easycart-hide-labels .form-row > label {
	display: none !important;
}


.easycart-wrapper input.input-text,
.easycart-wrapper select,
.easycart-wrapper textarea {
	width: 100%;
	padding: 10px 14px;
	font-size: 14px;
	color: var(--ec-text);
	background-color: #ffffff;
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-radius-sm);
	transition: var(--ec-transition);
	outline: none;
}

.easycart-wrapper input.input-text:focus,
.easycart-wrapper select:focus,
.easycart-wrapper textarea:focus {
	border-color: var(--ec-border-focus);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Shipping Methods */
.easycart-shipping-packages {
	margin-top: 8px;
}

.easycart-shipping-rates-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.easycart-shipping-rate-item {
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-radius-sm);
	padding: 12px 16px;
	transition: var(--ec-transition);
	background: #ffffff;
}

.easycart-shipping-rate-item:hover {
	border-color: #cbd5e1;
}

.easycart-shipping-rate-item.selected {
	border-color: var(--ec-primary);
	background-color: var(--ec-primary-light);
}

.easycart-shipping-label {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	margin: 0;
	width: 100%;
}

.easycart-rate-name {
	font-size: 14px;
	font-weight: 500;
	color: var(--ec-text);
	flex: 1;
}

.easycart-rate-cost {
	font-size: 14px;
	font-weight: 600;
	color: var(--ec-text);
}

/* Order Summary Box (Right Column) */
.easycart-summary-box {
	background: var(--ec-bg-surface);
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-radius);
	padding: 24px;
	box-shadow: var(--ec-shadow-sm);
}

.easycart-summary-table-wrapper {
	margin-bottom: 20px;
}

.easycart-summary-table {
	width: 100%;
	border-collapse: collapse;
}

.easycart-summary-table td,
.easycart-summary-table th {
	padding: 12px 0;
	border-bottom: 1px solid var(--ec-border);
	vertical-align: middle;
}

.easycart-item-col-visual {
	width: 60px;
}

.easycart-thumb-wrapper {
	position: relative;
	display: inline-block;
}

.easycart-item-thumb {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: var(--ec-radius-sm);
	border: 1px solid var(--ec-border);
	display: block;
}

.easycart-qty-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	background-color: #475569;
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.easycart-qty-pill {
	font-size: 13px;
	font-weight: 600;
	color: var(--ec-text-muted);
}

.easycart-summary-item-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--ec-text);
	display: block;
	line-height: 1.35;
}

.easycart-summary-item-variation {
	font-size: 12px;
	color: var(--ec-text-muted);
	margin-top: 2px;
}

.easycart-item-col-price {
	text-align: right;
	font-size: 14px;
	font-weight: 600;
	color: var(--ec-text);
}

.easycart-summary-table tfoot th {
	font-size: 14px;
	font-weight: 500;
	color: var(--ec-text-muted);
}

.easycart-summary-table tfoot td {
	text-align: right;
	font-size: 14px;
	color: var(--ec-text);
}

.easycart-summary-table tfoot .cart-discount td {
	color: var(--ec-success);
	font-weight: 600;
}

.easycart-summary-table tfoot .order-total th {
	font-size: 16px;
	font-weight: 700;
	color: var(--ec-text);
	border-bottom: none;
}

.easycart-summary-table tfoot .order-total td {
	font-size: 20px;
	font-weight: 700;
	color: var(--ec-primary);
	border-bottom: none;
}

/* Coupon Form */
.easycart-section-coupon {
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--ec-border);
}

.easycart-coupon-field-group {
	display: flex;
	gap: 8px;
}

.easycart-coupon-input {
	flex: 1;
}

.easycart-coupon-btn {
	background-color: var(--ec-text);
	color: #ffffff;
	border: none;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 600;
	border-radius: var(--ec-radius-sm);
	cursor: pointer;
	transition: var(--ec-transition);
	white-space: nowrap;
}

.easycart-coupon-btn:hover {
	background-color: #334155;
	color: #ffffff;
}

.easycart-coupon-message {
	font-size: 13px;
	margin-top: 8px;
	padding: 8px 12px;
	border-radius: var(--ec-radius-sm);
}

.easycart-coupon-message.success {
	background-color: var(--ec-success-bg);
	color: var(--ec-success);
}

.easycart-coupon-message.error {
	background-color: var(--ec-error-bg);
	color: var(--ec-error);
}

.easycart-applied-coupons-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.easycart-applied-coupon-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--ec-bg-badge);
	border: 1px solid var(--ec-border);
	padding: 4px 10px;
	border-radius: var(--ec-radius-full);
	font-size: 12px;
	font-weight: 600;
	color: var(--ec-text);
}

.easycart-remove-coupon-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	color: var(--ec-text-muted);
	padding: 0;
}

.easycart-remove-coupon-btn:hover {
	color: var(--ec-error);
}

/* Payment Gateways List */
.easycart-gateways-list {
	list-style: none;
	padding: 0;
	margin: 0 0 20px 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.easycart-payment-method {
	border: 1px solid var(--ec-border);
	border-radius: var(--ec-radius-sm);
	background: #ffffff;
	overflow: hidden;
	transition: var(--ec-transition);
}

.easycart-payment-method.active {
	border-color: var(--ec-primary);
	box-shadow: 0 0 0 1px var(--ec-primary);
}

.easycart-payment-label {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	margin: 0;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: var(--ec-text);
}

.easycart-gateway-title {
	flex: 1;
}

.easycart-gateway-icon img {
	max-height: 24px;
	vertical-align: middle;
}

.easycart-payment-box {
	padding: 14px 16px;
	background-color: var(--ec-bg-subtle);
	border-top: 1px solid var(--ec-border);
	font-size: 13px;
	color: var(--ec-text-muted);
	line-height: 1.5;
}

/* Privacy Notice */
.easycart-privacy-notice {
	font-size: 12px;
	color: var(--ec-text-muted);
	line-height: 1.45;
	margin-bottom: 20px;
}

/* Submit CTA Button */
.easycart-submit-btn {
	width: 100%;
	background-color: var(--ec-primary);
	color: #ffffff;
	border: none;
	padding: 16px 24px;
	font-size: 16px;
	font-weight: 700;
	border-radius: var(--ec-radius-sm);
	cursor: pointer;
	transition: var(--ec-transition);
	box-shadow: var(--ec-shadow-md);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.easycart-submit-btn:hover {
	background-color: var(--ec-primary-hover);
	color: #ffffff;
	box-shadow: var(--ec-shadow-lg);
	transform: translateY(-1px);
}

.easycart-submit-btn:active {
	transform: translateY(0);
}

.easycart-btn-text {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.easycart-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.easycart-btn-icon-left {
	margin-right: 8px;
}

.easycart-btn-icon-right {
	margin-left: 8px;
}


/* Loading Spinners */
.easycart-btn-spinner,
.easycart-coupon-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: easycartSpin 0.7s linear infinite;
}

.easycart-submit-btn.loading .easycart-btn-spinner,
.easycart-coupon-btn.loading .easycart-coupon-spinner {
	display: inline-block;
}

.easycart-submit-btn.loading .easycart-btn-text,
.easycart-coupon-btn.loading .easycart-coupon-btn-text {
	opacity: 0.8;
}

@keyframes easycartSpin {
	to {
		transform: rotate(360deg);
	}
}

/* Loading Overlay for fragments */
.easycart-loading-overlay {
	position: relative;
	pointer-events: none;
}

.easycart-loading-overlay::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.6);
	backdrop-filter: blur(1px);
	border-radius: inherit;
	z-index: 10;
}

/* Notices */
.easycart-notices-wrapper {
	margin-bottom: 20px;
}

.easycart-notice {
	padding: 14px 18px;
	border-radius: var(--ec-radius-sm);
	font-size: 14px;
	margin-bottom: 16px;
}

.easycart-notice-info {
	background-color: var(--ec-primary-light);
	border: 1px solid #bfdbfe;
	color: #1e40af;
}

.easycart-notice-warning {
	background-color: #fffbeb;
	border: 1px solid #fde68a;
	color: #92400e;
}

/* ==========================================================================
   Customer Information Fields Grid & Responsive Column Layout
   ========================================================================== */
.easycart-customer-fields {
	width: 100%;
}

.easycart-fields-grid {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: var(--ec-fields-gap, 16px) !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

/* Remove default WooCommerce floats and clearfixes that break modern flex */
.easycart-fields-grid::before,
.easycart-fields-grid::after {
	display: none !important;
}

/* Field Container Item */
.easycart-wrapper .easycart-fields-grid .form-row,
.easycart-wrapper .easycart-fields-grid .easycart-field {
	display: flex !important;
	flex-direction: column !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	box-sizing: border-box !important;
	position: relative;
}

/* Column Width: Full Width (100% - 1 Field Per Row) */
.easycart-wrapper .easycart-fields-grid .easycart-col-100,
.easycart-wrapper .easycart-fields-grid .form-row-wide {
	flex: 0 0 100% !important;
	width: 100% !important;
	max-width: 100% !important;
}

/* Column Width: Half Width (50% - 2 Fields Per Row) */
.easycart-wrapper .easycart-fields-grid .easycart-col-50,
.easycart-wrapper .easycart-fields-grid .form-row-first,
.easycart-wrapper .easycart-fields-grid .form-row-last {
	flex: 0 0 calc(50% - (var(--ec-fields-gap, 16px) / 2)) !important;
	width: calc(50% - (var(--ec-fields-gap, 16px) / 2)) !important;
	max-width: calc(50% - (var(--ec-fields-gap, 16px) / 2)) !important;
}

/* Column Width: One-Third Width (33.3% - 3 Fields Per Row) */
.easycart-wrapper .easycart-fields-grid .easycart-col-33 {
	flex: 0 0 calc(33.333% - (var(--ec-fields-gap, 16px) * 2 / 3)) !important;
	width: calc(33.333% - (var(--ec-fields-gap, 16px) * 2 / 3)) !important;
	max-width: calc(33.333% - (var(--ec-fields-gap, 16px) * 2 / 3)) !important;
}

/* Global 1-Column Layout Mode (All Fields Span 100% Full Width) */
.easycart-fields-grid.layout-cols-1 .form-row,
.easycart-fields-grid.layout-cols-1 .easycart-field {
	flex: 0 0 100% !important;
	width: 100% !important;
	max-width: 100% !important;
}

/* Global 3-Columns Layout Mode */
.easycart-fields-grid.layout-cols-3 .form-row:not(.easycart-col-100):not(.form-row-wide),
.easycart-fields-grid.layout-cols-3 .easycart-field:not(.easycart-col-100):not(.form-row-wide) {
	flex: 0 0 calc(33.333% - (var(--ec-fields-gap, 16px) * 2 / 3)) !important;
	width: calc(33.333% - (var(--ec-fields-gap, 16px) * 2 / 3)) !important;
	max-width: calc(33.333% - (var(--ec-fields-gap, 16px) * 2 / 3)) !important;
}

/* Responsive: On mobile and small screens, all fields expand to 100% full width */
@media (max-width: 767px) {
	.easycart-wrapper .easycart-fields-grid .form-row,
	.easycart-wrapper .easycart-fields-grid .easycart-field,
	.easycart-wrapper .easycart-fields-grid .easycart-col-50,
	.easycart-wrapper .easycart-fields-grid .easycart-col-33,
	.easycart-wrapper .easycart-fields-grid .form-row-first,
	.easycart-wrapper .easycart-fields-grid .form-row-last {
		flex: 0 0 100% !important;
		width: 100% !important;
		max-width: 100% !important;
	}
}

/* ==========================================================================
   Form Input Elements, Labels, & Focus States
   ========================================================================== */
.easycart-wrapper .woocommerce-input-wrapper {
	display: block !important;
	width: 100% !important;
	position: relative;
}

.easycart-wrapper .easycart-field label {
	font-size: 13.5px;
	font-weight: 600;
	color: #334155;
	margin: 0 0 6px 0;
	line-height: 1.4;
	display: flex;
	align-items: center;
	gap: 4px;
}

.easycart-wrapper .easycart-field label .required {
	color: #ef4444;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	border: none;
}

.easycart-wrapper .easycart-field label .optional {
	color: #94a3b8;
	font-weight: 400;
	font-size: 12px;
	font-style: italic;
}

/* Full Width Modern Inputs */
.easycart-wrapper .easycart-fields-grid input[type="text"],
.easycart-wrapper .easycart-fields-grid input[type="email"],
.easycart-wrapper .easycart-fields-grid input[type="tel"],
.easycart-wrapper .easycart-fields-grid input[type="number"],
.easycart-wrapper .easycart-fields-grid input[type="date"],
.easycart-wrapper .easycart-fields-grid input[type="password"],
.easycart-wrapper .easycart-fields-grid select,
.easycart-wrapper .easycart-fields-grid textarea,
.easycart-wrapper .input-text {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	display: block !important;
	height: 48px;
	padding: 10px 16px;
	font-size: 14px;
	font-family: inherit;
	color: #0f172a;
	background-color: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: var(--ec-radius-sm, 8px);
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
	transition: all 0.2s ease-in-out;
	outline: none;
}

.easycart-wrapper .easycart-fields-grid textarea {
	height: auto !important;
	min-height: 95px !important;
	resize: vertical;
	padding: 12px 16px;
	line-height: 1.5;
}

.easycart-wrapper .easycart-fields-grid select {
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px 16px;
	padding-right: 40px !important;
	appearance: none;
	-webkit-appearance: none;
}

.easycart-wrapper .easycart-fields-grid input:hover,
.easycart-wrapper .easycart-fields-grid select:hover,
.easycart-wrapper .easycart-fields-grid textarea:hover {
	border-color: #cbd5e1;
}

.easycart-wrapper .easycart-fields-grid input:focus,
.easycart-wrapper .easycart-fields-grid select:focus,
.easycart-wrapper .easycart-fields-grid textarea:focus {
	border-color: var(--ec-primary, #2563eb) !important;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
	background-color: #ffffff;
}

.easycart-wrapper .easycart-fields-grid input::placeholder,
.easycart-wrapper .easycart-fields-grid textarea::placeholder {
	color: #94a3b8;
	opacity: 1;
}

/* Checkbox field styling */
.easycart-wrapper .easycart-fields-grid .woocommerce-form__label-for-checkbox {
	display: flex !important;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: #334155;
	margin: 6px 0;
}

.easycart-wrapper .easycart-fields-grid input[type="checkbox"] {
	width: 18px !important;
	height: 18px !important;
	border-radius: 4px;
	accent-color: var(--ec-primary, #2563eb);
	cursor: pointer;
	margin: 0 !important;
}

/* Select2 / SelectWoo compatibility */
.easycart-wrapper .select2-container--default .select2-selection--single {
	height: 48px !important;
	border: 1.5px solid #e2e8f0 !important;
	border-radius: var(--ec-radius-sm, 8px) !important;
	padding: 10px 16px !important;
	display: flex !important;
	align-items: center !important;
}

.easycart-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: normal !important;
	padding: 0 !important;
	color: #0f172a !important;
	font-size: 14px !important;
}

.easycart-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 46px !important;
	right: 12px !important;
}

/* ==========================================================================
   Product Selection Prompt (Empty State)
   ========================================================================== */
.easycart-product-prompt-section {
	border: 2px dashed #cbd5e1 !important;
	background: #f8fafc !important;
	padding: 32px 24px !important;
	text-align: center;
}

.easycart-empty-product-prompt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	max-width: 480px;
	margin: 0 auto;
}

.easycart-empty-prompt-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #eff6ff;
	color: var(--ec-primary, #2563eb);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 4px;
}

.easycart-empty-prompt-title {
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
}

.easycart-empty-prompt-desc {
	font-size: 14px;
	color: #64748b;
	line-height: 1.6;
	margin: 0;
}

/* Order Summary Empty Cart State */
.easycart-summary-empty-row td {
	padding: 24px 16px !important;
	text-align: center;
}

.easycart-empty-summary-message {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: #64748b;
	font-size: 13.5px;
	font-weight: 500;
}

.easycart-empty-summary-message svg {
	color: #94a3b8;
	flex-shrink: 0;
}

