/* CT Equipment Widget — Frontend Styles */

.ct-equip-widget {
	font-family: inherit;
	line-height: 1.5;
}

.ct-equip-heading {
	margin-top: 0;
	margin-bottom: 1rem;
}

.ct-equip-empty {
	color: #6b7280;
	font-style: italic;
	margin: 0;
}

/* ── Card Grid ─────────────────────────────────────────────────────── */
.ct-equip-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.ct-equip-card {
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.2s ease;
}

.ct-equip-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ── Card Image ────────────────────────────────────────────────────── */
.ct-equip-card__image {
	width: 100%;
	height: 180px;
	overflow: hidden;
	background-color: #f3f4f6;
	flex-shrink: 0;
}

.ct-equip-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ct-equip-card__image--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #d1d5db;
}

.ct-equip-card__image--placeholder svg {
	width: 48px;
	height: 48px;
}

/* ── Card Body ─────────────────────────────────────────────────────── */
.ct-equip-card__body {
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.ct-equip-card__name {
	margin: 0;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.3;
}

.ct-equip-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: auto;
}

/* ── Badges ────────────────────────────────────────────────────────── */
.ct-equip-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.72em;
	font-weight: 600;
	white-space: nowrap;
	line-height: 1.7;
}

.ct-equip-badge--operational {
	background-color: #22c55e;
	color: #fff;
}

.ct-equip-badge--maintenance {
	background-color: #f59e0b;
	color: #fff;
}

.ct-equip-qty {
	font-size: 0.82em;
	opacity: 0.6;
	white-space: nowrap;
}

/* ── Tabs ──────────────────────────────────────────────────────────── */
.ct-tab-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 20px;
	border-bottom: 2px solid #e5e7eb;
}

.ct-tab-btn {
	padding: 8px 20px;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	background: transparent;
	cursor: pointer;
	font-size: 1em;
	color: #6b7280;
	transition: color 0.15s ease, border-color 0.15s ease;
	white-space: nowrap;
}

.ct-tab-btn:hover {
	color: #111827;
}

.ct-tab-btn.is-active {
	color: #111827;
	border-bottom-color: #111827;
	font-weight: 600;
}

.ct-tab-panel {
	display: none;
}

.ct-tab-panel.is-active {
	display: block;
}

/* ── Accordion ─────────────────────────────────────────────────────── */
.ct-accordion-item {
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	margin-bottom: 8px;
	overflow: hidden;
}

.ct-accordion-header {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	background-color: #f3f4f6;
	border: none;
	cursor: pointer;
	font-size: 1em;
	font-weight: 600;
	text-align: left;
	transition: background-color 0.15s ease;
}

.ct-accordion-header:hover,
.ct-accordion-header.is-active {
	background-color: #e5e7eb;
}

.ct-accordion-icon {
	width: 10px;
	height: 10px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.ct-accordion-header.is-active .ct-accordion-icon {
	transform: rotate(-135deg);
}

.ct-accordion-panel {
	padding: 16px;
}

.ct-accordion-panel[hidden] {
	display: none;
}

/* ── Description ──────────────────────────────────────────────────── */
.ct-equip-card__description {
	margin-top: 10px;
	color: #374151;
	font-size: 0.9em;
	line-height: 1.5;
}

.ct-equip-card__description p {
	margin: 0 0 0.5em;
}

.ct-equip-card__description p:last-child {
	margin-bottom: 0;
}

.ct-equip-card__description ul,
.ct-equip-card__description ol {
	margin: 0 0 0.5em;
	padding-left: 1.25em;
}

.ct-equip-card__description li {
	margin-bottom: 0.15em;
}
