/* SoftX Delivery & Checkout — storefront */

:root {
	--sdc-accent: #E2AD44;
	--sdc-border: #e2e8f0;
	--sdc-text: #334155;
	--sdc-muted: #64748b;
	--sdc-soft: #f8fafc;
	--sdc-accent-soft: rgba(226, 173, 68, 0.12);
}
@supports (color: color-mix(in srgb, red, blue)) {
	:root { --sdc-accent-soft: color-mix(in srgb, var(--sdc-accent) 14%, #ffffff); }
}

/* Review note under the shipping line */
.sdc-review-note td {
	padding-top: 6px !important;
	font-size: 13px;
	line-height: 1.5;
	color: var(--sdc-muted);
	text-align: left !important;
}
.sdc-review-note__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	margin-right: 4px;
	border-radius: 50%;
	background: var(--sdc-accent);
	color: #fff;
	font: italic 700 11px/1 Georgia, serif;
	vertical-align: -2px;
}

/* Disabled city dropdown before a district is chosen */
select.sdc-city-select:disabled + .select2 .select2-selection { opacity: .65; cursor: not-allowed; }

/* Delivery-charge pay box on the customer's order page */
.sdc-pay-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sdc-pay-box .button { margin-left: auto; }

/* Custom field details on the order page */
.sdc-customer-fields th { width: 40%; }

/* ---------------------------------------------------------------
   Dropdowns (General → Dropdown style)
   "Modern": SoftX dropdown list, field keeps the theme's own shape —
   checkout.js copies the corners / height / border of a text field
   into the --sdc-field-* variables below.
   "Pill": fully rounded field.
   --------------------------------------------------------------- */
body.sdc-style-modern { --sdc-field-radius: 4px; --sdc-field-height: 42px; --sdc-field-border: 1px solid #ddd; --sdc-field-bg: #fff; --sdc-field-color: inherit; --sdc-field-pad: 15px; --sdc-field-font: inherit; }
body.sdc-style-pill   { --sdc-field-radius: 40px; --sdc-field-height: 44px; --sdc-field-border: 1px solid var(--sdc-border); --sdc-field-bg: #fff; --sdc-field-color: var(--sdc-text); --sdc-field-pad: 20px; --sdc-field-font: 15px; }

:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-selection--single {
	height: var(--sdc-field-height) !important;
	min-height: var(--sdc-field-height) !important;
	border: var(--sdc-field-border) !important;
	border-radius: var(--sdc-field-radius) !important;
	background-color: var(--sdc-field-bg) !important;
	display: flex !important;
	align-items: center !important;
	box-sizing: border-box !important;
	transition: border-color .2s ease, box-shadow .2s ease !important;
}
/* Keep the same corners while open (some themes flatten one side). */
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default.select2-container--open .select2-selection--single,
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default.select2-container--focus .select2-selection--single {
	border-radius: var(--sdc-field-radius) !important;
	border-color: var(--sdc-accent) !important;
	box-shadow: 0 0 0 3px var(--sdc-accent-soft) !important;
}
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: normal !important;
	padding-left: var(--sdc-field-pad) !important;
	padding-right: 40px !important;
	font-size: var(--sdc-field-font) !important;
	color: var(--sdc-field-color) !important;
	width: 100%;
}
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-selection--single .select2-selection__placeholder { color: #94a3b8 !important; }
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100% !important;
	top: 0 !important;
	right: 12px !important;
}

/* Dropdown panel (appended to <body>) */
:is(body.sdc-style-modern, body.sdc-style-pill) > .select2-container--default .select2-dropdown {
	border: 1px solid var(--sdc-border) !important;
	border-radius: 12px !important;
	box-shadow: 0 12px 28px -8px rgba(15, 23, 42, .18), 0 6px 10px -6px rgba(15, 23, 42, .1) !important;
	overflow: hidden !important;
	z-index: 999999 !important;
}
body.sdc-style-modern > .select2-container--default .select2-dropdown { border-radius: max(6px, min(var(--sdc-field-radius), 14px)) !important; }
:is(body.sdc-style-modern, body.sdc-style-pill) > .select2-container--open .select2-dropdown--below { margin-top: 6px !important; border-top: 1px solid var(--sdc-border) !important; }
:is(body.sdc-style-modern, body.sdc-style-pill) > .select2-container--open .select2-dropdown--above { margin-bottom: 6px !important; border-bottom: 1px solid var(--sdc-border) !important; }

:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-search--dropdown {
	padding: 10px !important;
	background: var(--sdc-soft) !important;
	border-bottom: 1px solid #f1f5f9 !important;
}
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-search--dropdown .select2-search__field {
	height: 38px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	padding: 6px 12px !important;
	outline: none !important;
	font-size: 14px !important;
	background: #fff !important;
}
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-search--dropdown .select2-search__field:focus {
	border-color: var(--sdc-accent) !important;
	box-shadow: 0 0 0 3px var(--sdc-accent-soft) !important;
}
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-results > .select2-results__options {
	max-height: 260px !important;
	padding: 4px !important;
}
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-results__option {
	padding: 9px 14px !important;
	font-size: 14px !important;
	color: #475569 !important;
	border-radius: 8px !important;
	transition: background-color .15s ease, color .15s ease !important;
}
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-results__option--highlighted[aria-selected],
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-results__option--highlighted[data-selected] {
	background-color: #f1f5f9 !important;
	color: #0f172a !important;
}
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-results__option[aria-selected="true"],
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-results__option[data-selected="true"] {
	background-color: var(--sdc-accent-soft) !important;
	color: #1f2937 !important;
	font-weight: 600 !important;
}
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-results__options::-webkit-scrollbar { width: 6px; }
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-results__options::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-results__options::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
:is(body.sdc-style-modern, body.sdc-style-pill) .select2-results__options::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@media (prefers-reduced-motion: reduce) {
	:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-selection--single,
	:is(body.sdc-style-modern, body.sdc-style-pill) .select2-container--default .select2-results__option { transition: none !important; }
}
