/* Compound cable — UI custom length pe pagina produs */

/* Ascund native WC variations + pretul variatiei (folosim doar UI-ul nostru + pretul de sus) */
/* CSS-ul se incarca DOAR pe pagini compound cable, deci nu prefix necesar */
table.variations,
.reset_variations,
.woocommerce-variation-price,
.woocommerce-variation-availability,
.single_variation .price {
	display: none !important;
}

.lac-cc-length-picker {
	background: #fafafa;
	border-radius: 8px;
}

.lac-cc-length-picker select,
.lac-cc-length-picker input[type="number"] {
	font-size: 14px;
}

.lac-cc-length-picker input[type="number"]::-webkit-inner-spin-button,
.lac-cc-length-picker input[type="number"]::-webkit-outer-spin-button {
	opacity: 1;
}

/* Status mesaj — afisat sub buton */
.lac-cc-status {
	display: block;
	margin-top: 8px;
	font-size: 14px;
}

/* Auto-intro pe pagina single produs compound cable — text simplu, link-uri standard */
.lac-cc-auto-intro {
	margin: 0 0 16px 0;
}

/* ============================================================
 * Cart: cabluri compuse — TOATE componentele intr-un dreptunghi gri
 *   in master row (non-master sunt ascunse via cart_item_visible filter)
 * ============================================================ */

/* Title link spre parent compound */
.lac-cable-title-link {
	font-weight: 700;
	color: inherit;
	text-decoration: none;
	display: block;
	line-height: 1.3;
}
.lac-cable-title-link:hover {
	color: #fcb424;
}

/* Toggle row */
.lac-cable-toggle-row {
	margin-top: 4px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}
.lac-cable-toggle {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 12px;
	color: #4b994d;
	padding: 0;
	transition: transform 0.2s;
}
.lac-cable-toggle[aria-expanded="true"] {
	transform: rotate(90deg);
}
.lac-cable-toggle-text {
	font-style: italic;
	font-size: 12px;
	color: #888;
	user-select: none;
}
.lac-cable-toggle-row:hover .lac-cable-toggle-text {
	color: #4b994d;
}

/* Components panel — dreptunghi gri deschis cu TOATE componentele */
.lac-cable-components-panel {
	display: none; /* ascuns by default; JS arata cand expanded */
	background: #f3f3f3;
	border-radius: 6px;
	padding: 8px 12px;
	margin-top: 12px;
}
.lac-cable-components-panel.lac-cable-expanded {
	display: block;
}

/* Fiecare rand de componenta in panel */
.lac-cable-component-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid #e3e3e3;
}
.lac-cable-component-row:last-child {
	border-bottom: none;
}

.lac-cable-component-img img.lac-cable-comp-img {
	width: 50px;
	height: 50px;
	object-fit: contain;
	border-radius: 4px;
	background: #fff;
	display: block;
}
.lac-cable-component-info {
	flex: 1;
	min-width: 0;
}
.lac-cable-component-link {
	color: #333;
	font-weight: 500;
	text-decoration: none;
	font-size: 14px;
}
.lac-cable-component-link:hover {
	color: #fcb424;
}
.lac-cable-component-qty {
	min-width: 36px;
	padding: 4px 10px;
	background: #e8e8e8;
	border-radius: 4px;
	font-weight: 600;
	color: #333;
	text-align: center;
}

/* Role label (CONECTOR A, CABLU, etc.) */
.lac-cable-role-label {
	color: #999;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 2px;
}

/* Actiuni in panel-ul de configurator (Modifica + Copiaza link) */
.lac-cfg-cart-actions {
	border: none !important;
	padding-top: 14px !important;
	justify-content: flex-end !important;
	gap: 10px;
	flex-wrap: wrap;
}
.lac-cfg-cart-modify-btn {
	background: #5db95f;
	color: #fff !important;
	padding: 8px 16px;
	text-decoration: none !important;
	border-radius: 6px;
	font-size: 13px;
	border: 1px solid #5db95f;
	transition: background 0.15s, border-color 0.15s;
}
.lac-cfg-cart-modify-btn:hover,
.lac-cfg-cart-modify-btn:focus {
	background: #fcb424;
	border-color: #fcb424;
}
.lac-cfg-copy-link-btn {
	background: transparent;
	color: #4b994d;
	padding: 8px 14px;
	border: 1px dashed #4b994d;
	border-radius: 6px;
	font-size: 13px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background 0.15s, color 0.15s, border-style 0.15s;
}
.lac-cfg-copy-link-btn:hover,
.lac-cfg-copy-link-btn:focus {
	background: #4b994d;
	color: #fff;
	border-style: solid;
}
/* Tablet + mobile: centreaza cele doua butoane orizontal */
@media (max-width: 991.98px) {
	.lac-cfg-cart-actions {
		justify-content: center !important;
	}
}

/* Layout cart standard Blocksy nativ pe orice viewport — nu ascundem coloane.
   Rezolvarea "text componente rupt litera-cu-litera" se face prin word-break: normal
   pe panel-ul de componente (regula globala mai jos), NU prin ascunderea coloanelor de pret,
   cantitate, subtotal si delete. */

/* Row de expansiune — panel-ul de componente mutat aici (via JS) dintr-un td al master row,
   pentru a ocupa toata latimea liniei cu colspan complet. Fara padding/border straine. */
.lac-cable-expansion-row {
	background: transparent !important;
}
.lac-cable-expansion-cell {
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
}
.lac-cable-expansion-cell .lac-cable-components-panel {
	margin-top: 0 !important;
}


/* Componente compound cable — fix wrap litera-cu-litera + layout responsive */

/* GLOBAL: previn break-all mostenit din WC/Blocksy pe cart */
.lac-cable-components-panel,
.lac-cable-components-panel * {
	word-break: normal !important;
	overflow-wrap: anywhere;
	hyphens: none;
}
.lac-cable-component-link {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Cand panel-ul e in cell foarte ingusta (sub 320px) - vertical stack */
@container (max-width: 320px) {
	.lac-cable-component-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}
}
.lac-cable-components-panel {
	container-type: inline-size;
}

/* Fallback fara container queries: pe ecrane sub 1200px reduc dimensiuni */
@media (max-width: 1199.98px) {
	.lac-cable-components-panel {
		max-width: 100%;
		overflow: hidden;
	}
	.lac-cable-component-img img.lac-cable-comp-img {
		width: 42px;
		height: 42px;
	}
	.lac-cable-component-qty {
		min-width: 30px;
		padding: 3px 7px;
		font-size: 12px;
	}
	.lac-cable-component-row {
		gap: 8px;
	}
}

