/* ==========================================================
   Codnix Dhaka Shipping Selector v2 — Checkout & Cart Styles
   Author: Codnix Limited (https://codnix.top)
   ========================================================== */

/* ── Wrapper ─────────────────────────────────────────────── */
.dss-shipping-selector-wrap {
	margin: 0 0 24px;
	padding: 20px 22px 18px;
	background: #f8fafc;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	font-family: inherit;
	box-sizing: border-box;
}

/* ── Heading ─────────────────────────────────────────────── */
.dss-heading {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
	text-transform: uppercase;
	letter-spacing: .06em;
	display: flex;
	align-items: center;
	gap: 4px;
}

.dss-required { color: #ef4444; }

/* ── Cards row ───────────────────────────────────────────── */
.dss-options {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* ── Single card ─────────────────────────────────────────── */
.dss-option {
	flex: 1 1 160px;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
	position: relative;
	user-select: none;
	box-sizing: border-box;
}

.dss-option:hover {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99,102,241,.10);
}

.dss-option--active {
	border-color: #4f46e5;
	background: #eef2ff;
	box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}

/* ── Hidden native radio ─────────────────────────────────── */
.dss-radio {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

/* ── Custom radio circle ─────────────────────────────────── */
.dss-option__check {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border: 2px solid #cbd5e1;
	border-radius: 50%;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color .15s, background .15s;
}

.dss-option--active .dss-option__check {
	border-color: #4f46e5;
	background: #4f46e5;
}

.dss-option--active .dss-option__check::after {
	content: '';
	width: 8px;
	height: 8px;
	background: #fff;
	border-radius: 50%;
	display: block;
}

/* ── Card body ───────────────────────────────────────────── */
.dss-option__body {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

/* ── Icon bubble ─────────────────────────────────────────── */
.dss-option__icon {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: #e0e7ff;
	color: #4f46e5;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s, color .15s;
}

.dss-option__icon svg {
	width: 16px;
	height: 16px;
	display: block;
}

.dss-option--active .dss-option__icon {
	background: #4f46e5;
	color: #fff;
}

/* ── Text block ──────────────────────────────────────────── */
.dss-option__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.dss-option__label {
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dss-option--active .dss-option__label { color: #3730a3; }

.dss-option__fee {
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
}

.dss-option--active .dss-option__fee { color: #4f46e5; }

/* ── Helper text ─────────────────────────────────────────── */
.dss-helper-text {
	margin: 12px 0 0;
	font-size: 12px;
	color: #94a3b8;
	line-height: 1.5;
}

/* ── Hide WooCommerce shipping destination & calculator ──── */
.cart_totals .shipping-calculator-button,
.cart_totals .shipping-calculator-form,
.cart_totals .shipping ul li label a,
.cart_totals td.shipping .shipping-calculator-button,
p.woocommerce-shipping-destination,
.woocommerce-shipping-destination,
.woocommerce-info.wc-empty-cart-message ~ .shipping-calculator-form {
	display: none !important;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 520px) {
	.dss-shipping-selector-wrap {
		padding: 14px 12px 12px;
	}
	.dss-options {
		flex-direction: column;
	}
	.dss-option {
		flex: 1 1 auto;
	}
}

/* ── Elementor checkout compatibility ────────────────────── */
.e-checkout__container .dss-shipping-selector-wrap,
.elementor-widget-woocommerce-checkout-page .dss-shipping-selector-wrap {
	margin-bottom: 20px;
}
