
/* Collapsed-groups accordion for the Options/Features/Specifications tabs on
   a machine details page (includes/shortcodes.php, yue_render_details()).

   Same markup and class names as yellow-machine-equipement's
   YME_Renderer::spec_groups() (.machine-features--accordion,
   .machine-spec-group, button[data-accordion-toggle-all]), so a visitor sees
   one consistent design across both plugins' machine pages - but this
   plugin ships its own copy of the CSS/JS rather than depending on that
   plugin being active.

   Built from <details>/<summary>, so it opens with scripts blocked and
   answers to a keyboard without any extra markup.

   The !importants on the toggle button are not decorative: this site's own
   WordPress Customizer "Additional CSS" gives a bare <button> a dark filled
   background (the same conflict yellow-machine-equipement's own styles.css
   already documents and works around for this exact button) - without them
   this renders as a solid dark box instead of the plain text-link-with-
   chevron it's meant to be, reported directly.

   Color is the site's gold accent (#fdb715), matching the live
   yellow-machine-equipement reference page exactly (checked directly against
   its Customizer "Additional CSS" entry in the database, block dated
   21-09-2026: `.yme-single-equipment-inner .machine-accordion-toggle-all`) -
   that rule only reaches YME's own `.yme-single-equipment-inner` wrapper, not
   this plugin's markup, so the color is repeated here rather than relied on. */
button[data-accordion-toggle-all] {
	display: flex !important;
	align-items: center !important;
	gap: .35rem !important;
	margin: 0 0 .75rem auto !important;
	width: auto !important;
	max-width: none !important;
	background: none !important;
	border: 0 !important;
	border-bottom: 1px solid #fdb715 !important;
	border-radius: 0 !important;
	padding: 0 0 .2rem !important;
	color: #fdb715 !important;
	font-size: .8rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 1px !important;
	cursor: pointer !important;
}

button[data-accordion-toggle-all]::after {
	content: "";
	width: .45em;
	height: .45em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s ease;
}

button[data-accordion-toggle-all][aria-pressed="true"]::after {
	transform: rotate(-135deg);
}

button[data-accordion-toggle-all]:hover, button[data-accordion-toggle-all]:focus-visible {
	color: #d49b0e !important;
}

@media (prefers-reduced-motion: reduce) {
	button[data-accordion-toggle-all]::after {
		transition: none;
	}
}

.machine-features--accordion .machine-spec-group {
	border-bottom: 1px solid rgba(128, 128, 128, .35);
}

.machine-features--accordion summary {
	cursor: pointer;
	list-style: none;
	padding: 1rem 0;
	font-weight: 700;
	font-size: 18px;
	display: flex;
	align-items: flex-start;
	gap: .6rem;
}

/* Matches the live yellow-machine-equipement reference page's own responsive
   step for this exact heading (checked directly against its Customizer
   "Additional CSS" entry) rather than guessing a breakpoint. */
@media (max-width: 768px) {
	.machine-features--accordion summary {
		font-size: 16px;
	}
}

/* The default triangle is replaced with a chevron that turns, so the marker
   reads the same in every browser. */
.machine-features--accordion summary::-webkit-details-marker {
	display: none;
}

.machine-features--accordion summary::before {
	content: "";
	width: .5em;
	height: .5em;
	/* Keeps the chevron pinned to the label's first line instead of drifting
       to the vertical center of the whole summary - with align-items: center
       that center point moved whenever the label wrapped onto two lines on
       narrow/mobile widths, reported directly ("accordion icon same position
       main hona chahiye ... responsive"). The same position:relative/top
       nudge (not margin, to avoid stacking with any other top offset) and
       breakpoint step as the live reference page, checked directly against
       its Customizer "Additional CSS" entry rather than guessed. */
	position: relative;
	top: 5px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .2s ease;
	transform-origin: center;
	flex: none;
}

.machine-features--accordion details[open] > summary::before {
	top: 3px;
	transform: rotate(45deg);
}

@media (max-width: 575px) {
	.machine-features--accordion summary::before {
		top: 6px;
	}
}

.machine-features--accordion summary:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.machine-features--accordion .machine-spec-group table {
	margin: 0 0 1rem;
	width: 100%;
}

@media (prefers-reduced-motion: reduce) {
	.machine-features--accordion summary::before {
		transition: none;
	}
}

/* Boxed tab bar (Options / Features / Specifications / Resources), matching
   yellow-machine-equipement's own equivalent (assets/css/styles.css,
   `.yme-single-equipment-inner .machine-details-specs .nav-tabs`) - this
   plugin's markup already reuses the same .machine-details-specs/.nav-tabs/
   .nav-link class names (see includes/shortcodes.php, yue_render_details()),
   just without that plugin's .yme-single-equipment-inner wrapper, so the
   selectors here are unprefixed. Loaded only on the machine details page
   (yue_enqueue_details_assets()), so this never reaches any other
   .nav-tabs elsewhere on the site. */
.machine-details-specs .nav-tabs {
	display: flex;
	border: 1px solid #737373;
	margin-bottom: 0;
}

.machine-details-specs .nav-tabs .nav-item {
	flex: 1 1 0%;
	margin-bottom: 0;
	text-align: center;
}

/* A single tab (the common case - see yue_render_details(),
   includes/shortcodes.php) keeps its natural width and sits at the left of
   the bar, same as the reference design's own single-tab pages, instead of
   stretching to fill and centering in the middle of the whole box. */
.machine-details-specs .nav-tabs .nav-item:only-child {
	flex: 0 0 auto;
	text-align: left;
}

.machine-details-specs .nav-tabs .nav-link {
	display: block;
	border: 0;
	border-bottom: 0 !important;
	padding: .75rem 1rem;
	font-weight: 700;
	font-size: 20px;
	color: #1d2327;
}

.machine-details-specs .nav-tabs .nav-link.active {
	background-color: transparent;
	color: #495057;
}

.machine-details-specs .tab-content {
	border: 1px solid #737373;
	border-top: 0;
	padding: 40px 20px;
	margin: 0;
}

@media (min-width: 992px) {
	.machine-details-specs .tab-content {
		padding: 80px;
	}
}
