/* Structural base for every front-end component the plugin renders (.drx-* markup):
   product widgets (Woo Bridge) + resource rows/panels. Structural only, no !important,
   inherits the page font. The visual DROIX look lives in the selected skin
   (assets/css/skins/droix.css) so `skin: inherit` sites keep their own styling. */

/* ── Product widgets ─────────────────────────────────────────────── */

.drx-products-rail {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding: 4px 0 12px;
}

.drx-product {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 12px;
	background: #fff;
}

.drx-product--card,
.drx-product--rail {
	max-width: 220px;
	flex: 0 0 auto;
}

.drx-product--inline {
	display: flex;
	align-items: center;
	gap: 12px;
}

.drx-product__image img {
	max-width: 100%;
	height: auto;
	display: block;
}

.drx-product__name {
	display: block;
	font-weight: 600;
	text-decoration: none;
	margin-top: 8px;
}

.drx-product__price {
	font-weight: 700;
	margin-top: 4px;
}

.drx-product__stock {
	font-size: 0.85em;
	margin-top: 4px;
}

.drx-product__stock--oos {
	color: #b3261e;
}

.drx-product__stock--preorder {
	color: #8a5a00;
}

.drx-product__stock--instock {
	color: #1b7a3d;
}

.drx-product__stock--external {
	color: #666;
}

.drx-product__cta {
	display: inline-block;
	margin-top: 8px;
	padding: 6px 14px;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.9em;
}

.drx-product--fallback {
	color: #666;
	font-style: italic;
}

/* ── Resource rows / panels (dkr_resource_row / dkr_resources_panel) ── */

.drx-files {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 14px 16px;
	background: #fff;
}

.drx-files__title {
	font-size: 1em;
	font-weight: 700;
	margin: 0 0 8px;
}

.drx-res {
	border-top: 1px solid #f0f0f0;
	padding: 8px 0;
}

.drx-res:first-of-type,
.drx-files__title + .drx-res {
	border-top: 0;
}

.drx-res__row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.drx-res__badge {
	flex: 0 0 auto;
	font-size: 0.75em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 2px 8px;
	border-radius: 999px;
	background: #f0f0f0;
}

.drx-res__badge[data-type="fix_patch"] {
	background: #fde7e7;
	color: #9b1c1c;
}

.drx-res__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.drx-res__name {
	font-weight: 600;
}

.drx-res__meta {
	font-size: 0.8em;
	color: #888;
}

.drx-res__devices {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin: 2px 0;
}

.drx-res__device {
	font-size: 0.75em;
	font-weight: 600;
	padding: 2px 9px;
	border-radius: 999px;
	background: #f0f0f0;
	text-decoration: none;
	color: inherit;
}

.drx-res__guide {
	flex: 0 0 auto;
	padding: 4px 12px;
	border-radius: 8px;
	border: 1px solid #d9d9d9;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.85em;
	color: inherit;
}

.drx-res__cta {
	flex: 0 0 auto;
	padding: 4px 12px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.85em;
}

/* Theme-prose bleed guard: generic article-body link rules (e.g. `.gsk-prose a`, 0-1-1
   specificity) must never restyle the download CTA — these 0-2-1 selectors outrank them
   regardless of stylesheet load order. Colours still come from the active skin's variables. */
.drx-res a.drx-res__cta,
.drx-files a.drx-res__cta {
	text-decoration: none;
}

.drx-res__versions {
	margin: 6px 0 0;
}

.drx-res__toggle {
	cursor: pointer;
	font-size: 0.85em;
	font-weight: 600;
	color: #555;
}

.drx-res__version {
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 8px 12px;
	margin-top: 6px;
}

.drx-res__version-head {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.drx-res__vbadge {
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.05em;
	padding: 1px 6px;
	border-radius: 4px;
	background: #eef4d2;
}

.drx-res__vmeta {
	font-size: 0.8em;
	color: #888;
}

.drx-res__vdl {
	margin-left: auto;
	font-size: 0.8em;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid #d9d9d9;
	border-radius: 6px;
	padding: 2px 10px;
}

.drx-res__notes {
	margin: 6px 0 0;
	padding-left: 18px;
	font-size: 0.85em;
	color: #666;
}

.drx-res__cta-icon {
	display: inline-block;
	width: 13px;
	height: 13px;
	flex: 0 0 auto;
}

.drx-res__chevron {
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-left: 6px;
	flex: 0 0 auto;
}

.drx-res__current {
	flex: 0 0 auto;
	margin-left: auto;
	align-self: center;
	font-size: 0.8em;
	font-weight: 600;
}

.drx-res__rollback-note {
	margin: 8px 0 0;
	padding: 0 4px;
	font-size: 0.78em;
	color: #999;
}

/* ── Resource panel grouping (dkr_device_downloads() family view) ──────────── */

.drx-files__group + .drx-files__group {
	margin-top: 18px;
}

.drx-files__group-title {
	font-size: 0.95em;
	font-weight: 700;
	margin: 0 0 8px;
}

/* ── Download gate modal (dkr_gate_modal() / assets/js/front.js) ───────────── */

.drx-gate[hidden] {
	display: none;
}

.drx-gate {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: var( --drx-overlay, rgba( 0, 0, 0, 0.4 ) );
}

.drx-gate__card {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: 92vh;
	overflow-y: auto;
	box-sizing: border-box;
	padding: 26px 28px;
	background: var( --drx-card-bg, #fff );
	border-radius: var( --drx-card-radius, 24px );
	box-shadow: var( --drx-card-shadow, 0 24px 60px rgba( 17, 24, 39, 0.25 ) );
}

.drx-gate__close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 10px;
	background: transparent;
	cursor: pointer;
	line-height: 1;
	font-size: 18px;
}

.drx-gate__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.drx-gate__heading {
	margin: 14px 0 6px;
	padding-right: 32px;
	font-size: 1.35em;
	font-weight: 700;
}

.drx-gate__file {
	margin: 0 0 18px;
	font-size: 0.85em;
	line-height: 1.55;
}

.drx-gate__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	border-radius: 14px;
	padding: 4px;
	margin-bottom: 16px;
}

.drx-gate__tab {
	box-sizing: border-box;
	cursor: pointer;
	height: 36px;
	border: 0;
	border-radius: 10px;
	font-size: 0.85em;
	font-weight: 700;
	background: transparent;
}

.drx-gate__form[hidden] {
	display: none;
}

.drx-gate__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 13px;
	font-size: 0.8em;
	font-weight: 600;
}

.drx-gate__input {
	box-sizing: border-box;
	width: 100%;
	height: 46px;
	border-radius: 14px;
	padding: 0 14px;
	font-size: 0.9em;
}

.drx-gate__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 16px;
	font-size: 0.8em;
}

.drx-gate__remember {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
}

.drx-gate__cta {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 48px;
	border: 0;
	border-radius: 16px;
	font-weight: 700;
	cursor: pointer;
}

.drx-gate__otp-request {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.drx-gate__otp-request[hidden],
.drx-gate__otp-verify[hidden] {
	display: none;
}

.drx-gate__codes {
	display: grid;
	grid-template-columns: repeat( 6, 1fr );
	gap: 8px;
	margin-bottom: 12px;
}

.drx-gate__code {
	box-sizing: border-box;
	width: 100%;
	height: 52px;
	text-align: center;
	font-size: 20px;
	font-weight: 700;
	border-radius: 14px;
}

.drx-gate__resend {
	display: block;
	margin: 0 auto 14px;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 0.78em;
}

.drx-gate__error {
	margin-bottom: 10px;
	font-size: 0.8em;
}

.drx-gate__error[hidden] {
	display: none;
}

.drx-gate__signup {
	margin: 18px 0 0;
	padding-top: 16px;
	border-top: 1px solid var( --drx-stroke, #f0f0f0 );
	text-align: center;
	font-size: 0.85em;
}

.drx-gate__signup-link {
	font-weight: 700;
	text-decoration: none;
}

.drx-gate__step[hidden] {
	display: none;
}

.drx-gate__step--success {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 10px 0 4px;
	text-align: center;
}

.drx-gate__check {
	width: 60px;
	height: 60px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 26px;
}

.drx-gate__success-msg {
	margin: 0;
	font-size: 0.9em;
	line-height: 1.5;
}
