/**
 * Piktorfesték Stock Inventory - Frontend Styles
 * Matching the live site's wcmsm-style design exactly
 */

/* Fix Woodmart hook element spacing - no top margin needed after action buttons */
.wd-el-hook + .pf-inventory-wrapper {
	margin-top: 0;
}

/* Inventory Wrapper */
.pf-inventory-wrapper {
	margin: 5px 0 15px;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	background: #fff;
	font-size: 14px;
	line-height: 1.4;
}

/* Summary Section - Clickable header */
.pf-inventory-summary {
	padding: 15px;
	background: #f8f9fa;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	border-bottom: 1px solid #e2e2e2;
	user-select: none;
}

.pf-inventory-summary:hover {
	background: #f0f1f2;
}

.pf-inventory-summary.active {
	border-bottom-color: transparent;
}

/* Status Text */
.pf-inventory-status {
	font-weight: 500;
	color: #333;
}

.pf-inventory-status.pf-in-stock {
	color: #1e7e34;
}

.pf-inventory-status.pf-out-of-stock {
	color: #e2401c;
}

.pf-inventory-status.pf-select-variation {
	color: #666;
	font-style: italic;
	font-weight: 400;
}

/* Toggle Text with Arrow */
.pf-inventory-toggle {
	color: #666;
	position: relative;
	padding-right: 20px;
}

.pf-inventory-toggle::after {
	content: '\25BC'; /* ▼ */
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	transition: transform 0.3s ease;
	font-size: 10px;
}

.pf-inventory-summary.active .pf-inventory-toggle::after {
	transform: translateY(-50%) rotate(180deg);
}

/* Details Section - Hidden by default, animated via jQuery */
.pf-inventory-details {
	display: none;
	padding: 15px;
}

/* Store Item */
.pf-store-item {
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #f0f0f0;
}

.pf-store-item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

/* Store Header */
.pf-store-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

/* Store Name */
.pf-store-name {
	font-weight: 600;
	color: #333;
	font-size: 15px;
	text-decoration: none;
}

a.pf-store-name:hover {
	color: var(--wd-primary-color, #e52d2e);
}

/* Stock Badge */
.pf-stock-badge {
	background: #edf7ed;
	color: #1e7e34;
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 13px;
	font-weight: 500;
}

.pf-stock-badge.out-of-stock {
	background: #fde2e2;
	color: #e2401c;
}

/* Store Details */
.pf-store-details {
	color: #666;
	font-size: 13px;
}

.pf-store-details > div {
	margin-bottom: 6px;
}

.pf-store-details > div:last-child {
	margin-bottom: 0;
}

.pf-store-address,
.pf-store-hours,
.pf-store-phone,
.pf-store-email {
	color: #444;
}

/* Loading State */
.pf-inventory-wrapper.pf-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Responsive */
@media screen and (max-width: 480px) {
	.pf-store-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.pf-stock-badge {
		align-self: flex-start;
	}

	.pf-inventory-summary {
		flex-direction: column;
		gap: 8px;
		text-align: center;
	}

	.pf-inventory-toggle {
		padding-right: 0;
	}

	.pf-inventory-toggle::after {
		position: static;
		display: inline-block;
		margin-left: 5px;
		transform: none;
	}

	.pf-inventory-summary.active .pf-inventory-toggle::after {
		transform: rotate(180deg);
	}
}
