/* Drog - Product Docs — storefront styles. All vars scoped to module roots so
   nothing bleeds into the OpenCart theme. */
.ud-section,
.ud-badges {
	--ud-accent: #147d6a;
	--ud-accent-strong: #0f6154;
	--ud-accent-soft: #eef7f5;
	--ud-accent-line: #cfe7e1;
	--ud-accent-rgb: 20,125,106;
	--ud-ink: #1f2937;
	--ud-muted: #6b7280;
	--ud-line: #e6e8ee;
	--ud-bg: #ffffff;
	--ud-bg-soft: #f7f8fb;
	--ud-radius: 14px;
	--ud-radius-sm: 8px;
	--ud-pdf: #d61f1f;
	--ud-doc: #2b6cb0;
	--ud-xls: #2f855a;
	--ud-img: #2f855a;
	--ud-zip: #b7791f;
	--ud-file: #718096;
}

/* ---- section card ---- */
.ud-section {
	border: 1px solid var(--ud-line);
	border-radius: var(--ud-radius);
	background: var(--ud-bg);
	padding: 20px 22px;
	margin: 18px 0;
	box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 10px 26px -14px rgba(16,24,40,.16);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .28s ease-out, transform .28s ease-out;
}
.ud-section.ud-in { opacity: 1; transform: none; }
.ud-section__title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 600;
	color: var(--ud-ink);
}
.ud-group + .ud-group { margin-top: 14px; }
.ud-group__head {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ud-muted);
	text-transform: uppercase;
	letter-spacing: .03em;
	margin: 0 0 8px;
}
.ud-group__head .ud-ic { color: var(--ud-accent); flex: none; }
.ud-list { display: flex; flex-direction: column; gap: 8px; }

/* ---- file row ---- */
.ud-file {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--ud-line);
	border-radius: var(--ud-radius-sm);
	background: var(--ud-bg);
}
.ud-file__ic {
	flex: 0 0 auto;
	min-width: 42px;
	height: 34px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .02em;
	color: #fff;
	background: var(--ud-file);
}
.ud-file__ic--pdf { background: var(--ud-pdf); }
.ud-file__ic--doc { background: var(--ud-doc); }
.ud-file__ic--xls { background: var(--ud-xls); }
.ud-file__ic--img { background: var(--ud-img); }
.ud-file__ic--zip { background: var(--ud-zip); }

.ud-file__meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ud-file__title { font-size: 14px; color: var(--ud-ink); font-weight: 500; }
.ud-file__sub { font-size: 12px; color: var(--ud-muted); }

.ud-file__actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.ud-file__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid var(--ud-accent);
	border-radius: var(--ud-radius-sm);
	color: var(--ud-accent);
	background: var(--ud-bg);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ud-file__btn:hover { background: var(--ud-accent); color: #fff; text-decoration: none; }
.ud-file__btn .ud-ic { flex: none; }

/* secondary "view in browser" action — deliberately quieter than Download, and it
   opts out of the skin's button variants so the two actions stay distinguishable */
.ud-file__btn--ghost {
	border-color: transparent;
	background: transparent;
	color: var(--ud-muted);
	padding-left: 10px;
	padding-right: 10px;
}
.ud-file__btn--ghost:hover {
	background: var(--ud-accent-soft);
	color: var(--ud-accent-strong);
	border-color: var(--ud-accent-line);
}

/* skin: button style variants (class on .ud-section; outline = default/base).
   :not(--ghost) keeps the secondary action out of the fill/soft treatments. */
.ud-section.ud-skin-btn-solid .ud-file__btn:not(.ud-file__btn--ghost) { background: var(--ud-accent); color: #fff; }
.ud-section.ud-skin-btn-solid .ud-file__btn:not(.ud-file__btn--ghost):hover { background: var(--ud-accent-strong); border-color: var(--ud-accent-strong); }
.ud-section.ud-skin-btn-soft .ud-file__btn:not(.ud-file__btn--ghost) { background: var(--ud-accent-soft); color: var(--ud-accent-strong); border-color: var(--ud-accent-line); }
.ud-section.ud-skin-btn-soft .ud-file__btn:not(.ud-file__btn--ghost):hover { background: var(--ud-accent-line); color: var(--ud-accent-strong); }

/* ---- certificate badges (near buy button) ---- */
/* Badge tunables. Style/size modifiers flip these vars; the guard rules further
   down consume them AND win on specificity, so the theme's typography
   (.prod_details__item span rules in the buy column) can't bleed in. */
.ud-badges {
	--ud-badge-bg: var(--ud-bg-soft);
	--ud-badge-bd: var(--ud-line);
	--ud-badge-name: var(--ud-ink);
	--ud-badge-fs: 13px;
	--ud-badge-img: 34px;
	--ud-badge-ic: 18px;
	--ud-badge-pad: 5px 10px 5px 5px;
	/* shape: base = slightly rounded; the photo follows the badge's own corners */
	--ud-badge-radius: 8px;
	--ud-badge-img-radius: 5px;
	margin: 12px 0 4px;
}
/* stretch keeps photo badges and icon badges the same height in a mixed row */
.ud-badges__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.ud-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: var(--ud-badge-pad);
	border: 1px solid var(--ud-badge-bd);
	border-radius: var(--ud-badge-radius);
	background: var(--ud-badge-bg);
	text-decoration: none;
	transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.ud-badge:hover { --ud-badge-bd: var(--ud-accent); box-shadow: 0 2px 10px -4px rgba(var(--ud-accent-rgb), .5); text-decoration: none; }
.ud-badge img { object-fit: cover; flex: none; }

/* Leak guards: beat theme rules that bleed into the buy-button column —
   .prod_details__item span { color:#1e4e9d } (0,1,1) and
   .prod_details__item span:last-child { font-size:20px } (0,2,1).
   Our selectors are (0,2,0) for the label and (0,3,0) for the name. */
.ud-badges .ud-badges__label { display: block; font-size: 12px; color: var(--ud-muted); font-weight: 400; margin-bottom: 6px; }
.ud-badges .ud-badge .ud-badge__name { font-size: var(--ud-badge-fs); line-height: 1.2; color: var(--ud-badge-name); font-weight: 500; }
.ud-badges .ud-badge img { width: var(--ud-badge-img); height: var(--ud-badge-img); border-radius: var(--ud-badge-img-radius); }
/* Type icon on non-image badges (instructions, drawings…). It takes the SAME box as
   a photo so icon badges and photo badges line up at equal height; the glyph itself
   is drawn at --ud-badge-ic and centred by the padding. Colour follows the text, so
   it stays readable on the solid variant too. */
.ud-badges .ud-badge .ud-ic {
	width: var(--ud-badge-img);
	height: var(--ud-badge-img);
	padding: calc((var(--ud-badge-img) - var(--ud-badge-ic)) / 2);
	box-sizing: border-box;
	color: var(--ud-badge-name);
	flex: none;
}

/* badge style variants (class on .ud-badges; soft = base) */
.ud-badges--outline { --ud-badge-bg: transparent; --ud-badge-bd: var(--ud-accent-line); }
.ud-badges--solid { --ud-badge-bg: var(--ud-accent); --ud-badge-bd: var(--ud-accent); --ud-badge-name: #fff; }
.ud-badges--solid .ud-badge:hover { --ud-badge-bg: var(--ud-accent-strong); --ud-badge-bd: var(--ud-accent-strong); box-shadow: none; }
.ud-badges--plain { --ud-badge-bg: transparent; --ud-badge-bd: transparent; }
.ud-badges--plain .ud-badge { padding-left: 4px; padding-right: 8px; }
.ud-badges--plain .ud-badge:hover { --ud-badge-bg: var(--ud-accent-soft); }

/* badge sizes (md = base vars) */
.ud-badges--sz-sm { --ud-badge-fs: 12px; --ud-badge-img: 26px; --ud-badge-ic: 15px; --ud-badge-pad: 3px 9px 3px 3px; }
.ud-badges--sz-lg { --ud-badge-fs: 15px; --ud-badge-img: 44px; --ud-badge-ic: 22px; --ud-badge-pad: 7px 14px 7px 7px; }

/* badge shape (rounded = base vars) */
.ud-badges--sh-square { --ud-badge-radius: 0px; --ud-badge-img-radius: 0px; }
.ud-badges--sh-pill { --ud-badge-radius: 999px; --ud-badge-img-radius: 50%; }

/* keyboard focus — visible ring on interactive elements */
.ud-file__btn:focus-visible,
.ud-badge:focus-visible {
	outline: 2px solid var(--ud-accent);
	outline-offset: 2px;
}

/* sticky-nav link uses the theme's own .prod_links__item styles; nothing to add */

@media (max-width: 560px) {
	.ud-section { padding: 16px; }
	.ud-section__title { font-size: 16px; }
	/* file row: icon + text on top line, action button full-width below */
	.ud-file { flex-wrap: wrap; row-gap: 8px; padding: 12px; }
	.ud-file__meta { flex: 1 1 auto; }
	.ud-file__title { white-space: normal; }
	.ud-file__actions { flex: 1 1 100%; gap: 8px; }
	.ud-file__btn { flex: 1 1 0; justify-content: center; padding: 11px 14px; min-height: 44px; }
	.ud-file__btn--ghost { border-color: var(--ud-line); }
	/* badges: comfortable touch targets (padding still follows the size var) */
	.ud-badges__row { gap: 6px; }
	.ud-badge { min-height: 40px; }
}
