/**
 * Frontend styles for Woo Product Pairing Guide
 */

:root {
	--wppg-primary: #8e44ad;
	--wppg-primary-hover: #732d91;
	--wppg-ideal: #16a34a;
	--wppg-very-good: #2563eb;
	--wppg-good: #d97706;
	--wppg-bg: #ffffff;
	--wppg-bg-card: #ffffff;
	--wppg-text: #1e293b;
	--wppg-text-muted: #64748b;
	--wppg-border-color: #e2e8f0;
	--wppg-radius: 0px;
	--wppg-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
	--wppg-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.06);
	--wppg-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Wrapper - White Box Container */
.wppg-pairing-section-wrap,
.wppg-template-container,
.wppg-pairing-section {
	background: #ffffff !important;
	background-color: #ffffff !important;
	border: 1px solid #f0f0f0 !important;
	border-radius: 8px !important;
	padding: 24px 28px !important;
	margin: 0 0 30px 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
	font-family: inherit;
	color: var(--wppg-text, #1e293b);
	box-sizing: border-box !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	width: 100% !important;
}

.wppg-pairing-section-wrap:hover {
	border-color: #e8e8e8 !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

/* Ensure outer WooCommerce tab panel container does not create double borders/backgrounds */
.woosonshop-product-pairing-panel,
.woocommerce-Tabs-panel--wppg_pairings {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	box-shadow: none !important;
	margin: 0 !important;
	width: 100% !important;
}

.woosonshop-product-pairing-panel .wppg-pairing-section-wrap,
.woocommerce-Tabs-panel--wppg_pairings .wppg-pairing-section-wrap {
	margin-bottom: 0 !important;
}

@media (max-width: 640px) {
	.wppg-pairing-section-wrap,
	.wppg-template-container,
	.wppg-pairing-section {
		padding: 18px 18px !important;
		margin-bottom: 20px;
	}
}

.wppg-main-heading,
.wppg-page-title,
.woosonshop-product-pairing-panel h2 {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--text-color, #222);
	margin-top: 0;
	margin-bottom: 18px;
	padding-bottom: 10px;
	position: relative;
	border-bottom: 2px solid var(--primary-color, var(--wppg-primary, #a6892c));
	line-height: 1.3;
}

.wppg-main-heading-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--primary-color, var(--wppg-primary, #a6892c));
	flex-shrink: 0;
}

.wppg-main-heading-icon svg,
.wppg-food-icon {
	display: block;
	flex-shrink: 0;
}

.wppg-sections-flow {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wppg-sub-section {
	margin-bottom: 0;
	padding-bottom: 20px;
	border-bottom: 1px solid #f1f5f9;
}

.wppg-sub-section:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.wppg-sub-heading,
.wppg-section-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.92rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-top: 0;
	margin-bottom: 12px;
	color: #475569;
}

.wppg-sub-heading-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--wppg-primary, #8e44ad);
	opacity: 0.85;
	flex-shrink: 0;
}

.wppg-sub-heading-icon svg {
	display: block;
	width: 16px;
	height: 16px;
}

.wppg-sub-heading-text {
	line-height: 1.3;
}

/* Taxonomy Sections / Badges Container inside unified white box */
.wppg-sub-section-taxonomies {
	background: transparent;
	border: none;
	border-radius: 0 !important;
	padding: 0;
	box-shadow: none;
}

/* Card Grid */
.wppg-card-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr;
}

.wppg-cols-1 { grid-template-columns: 1fr; }
.wppg-cols-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.wppg-cols-3 { grid-template-columns: 1fr; }
.wppg-cols-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

@media (min-width: 768px) {
	.wppg-cols-2 { grid-template-columns: repeat(2, 1fr); }
	.wppg-cols-3 { grid-template-columns: 1fr; }
	.wppg-cols-4 { grid-template-columns: repeat(4, 1fr); }
	.wppg-cols-5 { grid-template-columns: repeat(5, 1fr); }
	.wppg-cols-6 { grid-template-columns: repeat(6, 1fr); }
}

/* Card */
.wppg-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 0 !important;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	position: relative;
}

.wppg-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
	border-color: #cbd5e1;
}

.wppg-card.is-featured {
	border-left: 3px solid var(--wppg-primary, #8e44ad);
}

.wppg-featured-tag {
	position: absolute;
	top: 8px;
	right: 8px;
	background: var(--wppg-primary, #8e44ad);
	color: #ffffff;
	padding: 2px 8px;
	font-size: 0.68rem;
	font-weight: 700;
	border-radius: 0 !important;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	z-index: 2;
}

.wppg-card-thumb {
	position: relative;
	width: 100%;
	padding-top: 45%;
	background: #f8fafc;
	overflow: hidden;
	border-radius: 0 !important;
}

.wppg-card-thumb img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
	border-radius: 0 !important;
}

.wppg-card:hover .wppg-card-thumb img {
	transform: scale(1.03);
}

.wppg-no-thumb {
	display: none !important;
}

.wppg-card-body {
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.wppg-strength-badge {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	padding: 3px 8px;
	font-size: 0.68rem;
	font-weight: 700;
	border-radius: 0 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 6px;
	color: #ffffff;
}

.wppg-strength-ideal,
.wppg-strength-match { background: #16a34a; }
.wppg-strength-very_good { background: #2563eb; }
.wppg-strength-good { background: #d97706; }

.wppg-card-title {
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 6px;
	line-height: 1.35;
	color: #1e293b;
}

.wppg-card-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.wppg-card-title a:hover {
	color: var(--wppg-primary, #8e44ad);
}

.wppg-card-meta-pills {
	display: flex;
	gap: 6px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}

.wppg-meta-pill {
	background: #f1f5f9;
	color: #475569;
	border: 1px solid #e2e8f0;
	padding: 2px 8px;
	font-size: 0.72rem;
	font-weight: 600;
	border-radius: 0 !important;
}

.wppg-card-price {
	font-weight: 700;
	font-size: 0.95rem;
	color: #0f172a;
	margin-bottom: 6px;
}

.wppg-card-explanation,
.wppg-card-excerpt {
	font-size: 0.82rem;
	line-height: 1.45;
	color: #64748b;
	margin: 0 0 6px;
}

.wppg-serving-note {
	font-size: 0.8rem;
	line-height: 1.4;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 6px 10px;
	border-radius: 0 !important;
	margin-top: auto;
	margin-bottom: 6px;
	color: #475569;
}

.wppg-card-action {
	margin-top: auto;
	padding-top: 6px;
}

.wppg-card-action .button,
.wppg-card-action a.button {
	border-radius: 0 !important;
}

/* Badges Cloud & Tags */
.wppg-badge-group,
.wppg-taxonomy-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 0;
}

.wppg-badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	font-size: 0.82rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	border-radius: 0 !important;
	text-decoration: none;
	border: 1px solid transparent;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: default;
}

.wppg-badge-course {
	background: #f8fafc;
	color: #334155;
	border-color: #e2e8f0;
}

.wppg-badge-course:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: #0f172a;
}

.wppg-badge-food {
	background: #f0fdf4;
	color: #166534;
	border-color: #dcfce7;
}

.wppg-badge-food:hover {
	background: #dcfce7;
	border-color: #bbf7d0;
	color: #14532d;
}

.wppg-badge-occasion {
	background: #fefce8;
	color: #854d0e;
	border-color: #fef08a;
}

.wppg-badge-occasion:hover {
	background: #fef08a;
	border-color: #fde047;
	color: #713f12;
}

/* Recipe Details */
.wppg-recipe-meta-bar {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 12px;
	background: #f8fafc;
	padding: 15px;
	border-radius: 0 !important;
	border: 1px solid var(--wppg-border-color);
	margin-bottom: 2em;
	text-align: center;
}

.wppg-meta-item {
	display: flex;
	flex-direction: column;
}

.wppg-meta-label {
	font-size: 0.75em;
	color: var(--wppg-text-muted);
	text-transform: uppercase;
	font-weight: 700;
}

.wppg-meta-val {
	font-size: 1.1em;
	font-weight: 700;
	color: var(--wppg-text);
	margin-top: 4px;
}

/* Ingredients */
.wppg-ingredients-section {
	margin: 2em 0;
}

.wppg-ingredients-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.wppg-ingredient-item {
	padding: 8px 0;
	border-bottom: 1px solid #f1f5f9;
}

.wppg-ingredient-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}

.wppg-ingredient-check:checked + .wppg-ingredient-text {
	text-decoration: line-through;
	color: #94a3b8;
}

.wppg-ing-amount {
	margin-right: 6px;
	color: #1e293b;
}

.wppg-ing-note {
	font-style: italic;
	color: #64748b;
	font-size: 0.9em;
}

/* Instructions */
.wppg-instructions-section {
	margin: 2em 0;
}

.wppg-instructions-list {
	padding-left: 1.5em;
}

.wppg-step-item {
	margin-bottom: 1.5em;
}

.wppg-step-title {
	font-size: 1.1em;
	margin: 0 0 0.4em;
}

.wppg-step-text {
	line-height: 1.6;
}

.wppg-step-img {
	max-width: 100%;
	height: auto;
	border-radius: 0 !important;
	margin-top: 10px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	.wppg-card,
	.wppg-card-thumb img {
		transition: none !important;
		transform: none !important;
	}
}

/* Shop Product Filter Styles */
.wppg-shop-filter-wrapper {
	background: #fff;
	border: 1px solid var(--wppg-border-color);
	border-radius: 0 !important;
	padding: 1.5em;
	margin: 1.5em 0;
	box-shadow: var(--wppg-shadow);
}

.widget_wppg_shop_filter .wppg-shop-filter-wrapper {
	border: none;
	padding: 0;
	box-shadow: none;
	background: transparent;
	margin: 0;
}

.wppg-shop-filter-main-title {
	font-size: 1.25em;
	margin-top: 0;
	margin-bottom: 1em;
	padding-bottom: 0.4em;
	border-bottom: 1px solid var(--wppg-border-color);
	color: var(--wppg-text);
}

.wppg-filter-facets-container {
	display: flex;
	flex-direction: column;
	gap: 1.25em;
}

.wppg-filter-facet-section {
	display: flex;
	flex-direction: column;
}

.wppg-filter-facet-title {
	font-size: 0.95em;
	font-weight: 700;
	color: #334155;
	margin: 0 0 0.6em 0;
}

/* Checkbox Style */
.wppg-filter-checkboxes-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wppg-filter-checkbox-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9em;
	color: #475569;
	cursor: pointer;
	padding: 3px 0;
	user-select: none;
}

.wppg-filter-checkbox-item:hover {
	color: var(--wppg-primary);
}

.wppg-filter-checkbox-item.is-checked {
	font-weight: 600;
	color: var(--wppg-primary);
}

.wppg-filter-checkbox-input {
	cursor: pointer;
	accent-color: var(--wppg-primary);
}

.wppg-filter-checkbox-count {
	font-size: 0.8em;
	color: #94a3b8;
	margin-left: auto;
	background: #f1f5f9;
	padding: 1px 6px;
	border-radius: 0 !important;
}

/* Pills / Buttons Style */
.wppg-filter-pills-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.wppg-filter-pill-label {
	display: inline-block;
	cursor: pointer;
}

.wppg-filter-hidden-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wppg-filter-pill-text {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #f8fafc;
	border: 1px solid var(--wppg-border-color);
	border-radius: 0 !important;
	padding: 4px 12px;
	font-size: 0.85em;
	color: #475569;
	transition: all 0.2s;
}

.wppg-filter-pill-label:hover .wppg-filter-pill-text {
	background: #f1f5f9;
	border-color: #cbd5e1;
}

.wppg-filter-pill-label.is-active .wppg-filter-pill-text,
.wppg-filter-pill-label input:checked + .wppg-filter-pill-text {
	background: var(--wppg-primary);
	border-color: var(--wppg-primary);
	color: #fff;
}

.wppg-filter-pill-label.is-active .wppg-filter-pill-count,
.wppg-filter-pill-label input:checked + .wppg-filter-pill-text .wppg-filter-pill-count {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
}

.wppg-filter-pill-count {
	font-size: 0.8em;
	opacity: 0.8;
	border-radius: 0 !important;
}

/* Dropdown Style */
.wppg-filter-select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--wppg-border-color);
	border-radius: 0 !important;
	font-size: 0.9em;
	background: #fff;
	color: #334155;
}

/* Links List Style */
.wppg-filter-links-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wppg-filter-link-item {
	font-size: 0.9em;
}

.wppg-filter-link {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #475569;
	text-decoration: none;
	padding: 3px 0;
}

.wppg-filter-link:hover {
	color: var(--wppg-primary);
}

.wppg-filter-link-item.is-active .wppg-filter-link {
	color: var(--wppg-primary);
	font-weight: 700;
}

.wppg-filter-link-count {
	margin-left: auto;
	font-size: 0.8em;
	color: #94a3b8;
	border-radius: 0 !important;
}

/* Form Actions */
.wppg-filter-form-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 1.25em;
	padding-top: 1em;
	border-top: 1px solid var(--wppg-border-color);
}

.wppg-filter-apply-btn {
	background: var(--wppg-primary) !important;
	color: #fff !important;
	border: none !important;
	padding: 8px 16px !important;
	border-radius: 0 !important;
	cursor: pointer;
	font-weight: 600;
}

.wppg-filter-clear-btn {
	background: #f1f5f9 !important;
	color: #64748b !important;
	border: 1px solid #cbd5e1 !important;
	padding: 6px 12px !important;
	border-radius: 0 !important;
	text-decoration: none !important;
	font-size: 0.85em;
}

.wppg-filter-clear-btn:hover {
	background: #e2e8f0 !important;
	color: #334155 !important;
}
