/* ── Nordsta Price List Shortcode ── */

.nordsta-pl-heading {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 1.2rem;
}

.nordsta-pl-notice {
	color: #6b7280;
	font-style: italic;
}

.nordsta-pricelist {
	font-family: inherit;
	max-width: 100%;
}

/* ── Tabs ── */

.npl-header {
	align-items: center;
	display: flex;
	gap: 1rem;
	margin-bottom: 1.2rem;
}

.npl-header .nordsta-pl-heading {
	flex: 1;
	margin-bottom: 0;
}

.npl-header .npl-btn-near-me {
	flex-shrink: 0;
	margin-left: auto;
}

.npl-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 1.5rem;
}

.npl-tab {
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	color: #374151;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 500;
	padding: 6px 14px;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	white-space: nowrap;
}

.npl-tab:hover {
	background: #e9eaec;
	border-color: #d1d5db;
}

.npl-tab.active {
	background: #111827;
	border-color: #111827;
	color: #fff;
}

.npl-tab-unassigned.active {
	background: #92400e;
	border-color: #92400e;
}

.npl-tab-unassigned:not(.active) {
	border-color: #fbbf24;
	color: #92400e;
}

.npl-tab-count {
	font-weight: 400;
	opacity: 0.75;
}

/* ── Sections ── */

.npl-section {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.npl-section-heading {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 1.5rem 0 0.75rem;
}

/* ── Table ── */

.npl-table {
	border-collapse: collapse;
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
	width: 100%;
}

.npl-table thead th {
	border-bottom: 2px solid #e5e7eb;
	color: #6b7280;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 6px 10px;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}

.npl-table tbody tr + tr {
	border-top: 1px solid #f3f4f6;
}

.npl-row td {
	padding: 16px 10px;
	vertical-align: middle;
}

.npl-expandable {
	cursor: pointer;
	user-select: none;
}

.npl-expandable:hover td {
	background: #f9fafb;
}

.npl-row.npl-open td {
	background: #f9fafb;
}

/* Column widths */

.npl-col-toggle {
	padding: 0 12px !important;
	text-align: center;
	white-space: nowrap;
	width: 1%;
}

.npl-icon {
	color: #9ca3af;
	display: inline-block;
	transform: rotate(-90deg);
	transform-origin: center;
	transition: transform 0.2s ease;
	vertical-align: middle;
}

.npl-icon.open {
	transform: rotate(0deg);
}

.npl-col-name {
	min-width: 140px;
	width: 35%;
}

.npl-col-info {
	color: #6b7280;
	font-size: 0.85rem;
	width: 20%;
}

.npl-col-size {
	white-space: nowrap;
	width: 14%;
}

.npl-col-price {
	white-space: nowrap;
	width: 18%;
}

.npl-col-units,
.npl-col-avail {
	text-align: right;
	white-space: nowrap;
	width: 8%;
}

.npl-zero {
	color: #9ca3af;
}

.npl-col-btn {
	padding-left: 32px !important;
	text-align: right;
	white-space: nowrap;
	width: 1%;
}

.npl-btn-link {
	background: #111827;
	border-radius: 5px;
	color: #fff;
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 8px 16px;
	text-decoration: none;
	transition: background 0.15s;
	white-space: nowrap;
}

.npl-btn-link:hover,
.npl-btn-link:focus {
	background: #374151;
	color: #fff;
}

/* ── Detail rows ── */

.npl-collapsed {
	display: none;
}

.npl-detail td {
	padding: 0 !important;
}

.npl-detail-inner {
	background: #f9fafb;
	border-top: 1px solid #e5e7eb;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding: 12px 16px 14px;
}

.npl-breakdown {
	border-collapse: collapse;
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
	margin-bottom: 8px;
	width: 100%;
}

.npl-breakdown th,
.npl-breakdown td {
	padding: 10px 20px !important;
	text-align: left;
}

.npl-breakdown th {
	border-bottom: 2px solid #e5e7eb;
	color: #9ca3af;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
}

.npl-breakdown td {
	color: #374151;
}

.npl-breakdown th:first-child,
.npl-breakdown td:first-child {
	padding-left: 0 !important;
}

.npl-breakdown tbody tr:nth-child(odd) td {
	background: #f9fafb;
}

.npl-breakdown tbody tr:nth-child(even) td {
	background: #ffffff;
}

.npl-source {
	color: #9ca3af;
	font-size: 0.78rem;
	margin: 6px 0 0;
}

.npl-detail-desc {
	color: #374151;
	font-size: 0.88rem;
	line-height: 1.65;
	margin: 0 0 14px;
}

.npl-no-rows {
	color: #9ca3af;
	font-size: 0.85rem;
	margin: 0;
}

/* ── Campaign pricing ── */

.npl-price-campaign {
	color: #e05252;
	display: block;
	font-weight: 700;
}

.npl-campaign-tag {
	background: #e05252;
	border: 1px solid #e05252;
	border-radius: 3px;
	color: #fff;
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	margin-left: 5px;
	padding: 2px 5px;
	text-transform: uppercase;
	vertical-align: middle;
	white-space: nowrap;
}

.npl-price-original {
	color: #9ca3af;
	display: block;
	font-size: 0.8rem;
	text-decoration: line-through;
}

.npl-price-campaign-sm {
	color: #e05252;
	display: block;
	font-weight: 700;
}

/* ── Near me ── */

.npl-btn-near-me {
	align-items: center;
	background: transparent;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	color: #6b7280;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 500;
	gap: 5px;
	padding: 6px 12px;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	white-space: nowrap;
}

.npl-btn-near-me:hover {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #374151;
}

.npl-btn-near-me.active {
	background: #eff6ff;
	border-color: #93c5fd;
	color: #2563eb;
}

.npl-btn-near-me:disabled {
	opacity: 0.6;
	pointer-events: none;
}

.npl-distance {
	background: #eff6ff;
	border-radius: 4px;
	color: #3b82f6;
	font-size: 0.72rem;
	font-weight: 600;
	margin-left: 8px;
	padding: 2px 6px;
	vertical-align: middle;
}

/* ── Tags ── */

.npl-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 5px;
}

.npl-tag {
	background: #fef3c7;
	border: 1px solid #fcd34d;
	border-radius: 3px;
	color: #92400e;
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 2px 6px;
	text-transform: uppercase;
	white-space: nowrap;
}

.npl-near-spinner {
	animation: npl-spin 0.7s linear infinite;
	border: 2px solid currentColor;
	border-radius: 50%;
	border-top-color: transparent;
	display: inline-block;
	height: 11px;
	opacity: 0.7;
	width: 11px;
}

@keyframes npl-spin {
	to { transform: rotate(360deg); }
}

/* ── Near me error state ── */

.npl-btn-near-me.error {
	border-color: #fca5a5;
	color: #dc2626;
}

/* ── Responsive ── */

@media (max-width: 768px) {
	.npl-col-info,
	.npl-col-units {
		display: none;
	}

	.npl-tabs {
		gap: 4px;
	}

	.npl-tab,
	.npl-btn-near-me {
		font-size: 0.8rem;
		padding: 5px 10px;
	}
}

@media (max-width: 600px) {
	/* ── Card layout ── */

	.npl-section {
		overflow-x: visible;
	}

	.npl-table {
		display: block;
	}

	.npl-table thead {
		display: none;
	}

	.npl-table tbody {
		display: block;
		width: 100%;
	}

	/* Kill the default row separator — cards define their own separation */
	.npl-table tbody tr + tr {
		border-top: none;
	}

	.npl-row {
		background: #fff;
		border: 1px solid #e5e7eb;
		border-radius: 10px;
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
		display: grid;
		grid-template-areas:
			"name   toggle"
			"price  toggle"
			"btn    btn";
		grid-template-columns: 1fr auto;
		margin-bottom: 14px;
		overflow: hidden;
		width: 100%;
	}

	.npl-row td {
		display: block;
	}

	.npl-col-name {
		border-bottom: 1px solid #f0f0f0;
		grid-area: name;
		min-width: 0;
		padding: 16px 16px 10px;
		width: auto;
	}

	.npl-col-name strong {
		font-size: 1.05rem;
		font-weight: 700;
	}

	.npl-col-toggle {
		align-items: center;
		color: #9ca3af;
		display: flex !important;
		grid-area: toggle;
		grid-row: 1 / 3;
		justify-content: center;
		padding: 0 20px !important;
	}

	.npl-col-price {
		color: #374151;
		font-size: 0.95rem;
		font-weight: 500;
		grid-area: price;
		padding: 4px 16px 16px;
		white-space: normal;
		width: auto;
	}

	.npl-col-btn {
		border-top: 1px solid #f0f0f0;
		grid-area: btn;
		padding: 12px 16px 14px !important;
		text-align: left !important;
		white-space: normal;
		width: auto;
	}

	.npl-col-btn .npl-btn-link {
		display: block;
		text-align: center;
	}

	/* Hidden cells */
	.npl-col-info,
	.npl-col-size,
	.npl-col-units,
	.npl-col-avail {
		display: none !important;
	}

	@supports selector(:has(a)) {
		.npl-col-btn:not(:has(.npl-btn-link)) {
			display: none !important;
		}
	}

	/* Override individual-cell background from base CSS */
	.npl-expandable:hover td,
	.npl-row.npl-open td {
		background: transparent;
	}

	.npl-row.npl-expandable:hover {
		background: #f9fafb;
	}

	/* Open card connects to the detail panel below */
	.npl-row.npl-open {
		background: #f9fafb;
		border-bottom-color: transparent;
		border-radius: 10px 10px 0 0;
		box-shadow: none;
		margin-bottom: 0;
	}

	.npl-detail:not(.npl-collapsed) {
		border: 1px solid #e5e7eb;
		border-radius: 0 0 10px 10px;
		border-top: none;
		display: block !important;
		margin-bottom: 14px;
	}

	.npl-detail td {
		display: block;
		padding: 0 !important;
	}

	.npl-detail-inner {
		border-radius: 0 0 10px 10px;
		border-top: none;
		width: 100%;
	}

	/* Breakdown table — size + price only, one line per row */
	.npl-breakdown,
	.npl-breakdown tbody {
		display: block;
		width: 100%;
	}

	.npl-breakdown thead {
		display: none;
	}

	.npl-breakdown tbody tr {
		align-items: baseline;
		border-bottom: 1px solid #e5e7eb;
		display: flex;
		padding: 9px 0;
		width: 100%;
	}

	.npl-breakdown tbody tr:last-child {
		border-bottom: none;
	}

	/* size cell — fixed width so price always aligns */
	.npl-breakdown tbody td:nth-child(1) {
		flex: 0 0 76px;
		padding: 0 !important;
		white-space: nowrap;
	}

	/* price cell */
	.npl-breakdown tbody td:nth-child(2) {
		flex: 1;
		padding: 0 !important;
	}

	/* hide units and available */
	.npl-breakdown tbody td:nth-child(3),
	.npl-breakdown tbody td:nth-child(4) {
		display: none !important;
	}

	/* Kill alternating-square backgrounds */
	.npl-breakdown tbody tr:nth-child(odd) td,
	.npl-breakdown tbody tr:nth-child(even) td {
		background: transparent;
	}

	/* Campaign + original price inline on same line */
	.npl-breakdown .npl-price-campaign-sm,
	.npl-breakdown .npl-price-original {
		display: inline;
		margin-right: 6px;
	}

	.npl-section-heading {
		font-size: 1rem;
		margin-top: 1.2rem;
	}
}

/* ── Theme isolation ──
   Themes such as Hello Elementor style every table (cell borders, striped and hover row backgrounds)
   and Elementor kits style every button. Reset those inside the price list so it looks the same on every site. */

.nordsta-pricelist table,
.nordsta-pricelist table td,
.nordsta-pricelist table th {
	border: 0;
}

.nordsta-pricelist table tbody > tr:nth-child(odd) > td,
.nordsta-pricelist table tbody > tr:hover > td,
.nordsta-pricelist table tbody > tr > td {
	background-color: transparent;
}

.nordsta-pricelist .npl-table thead th {
	border-bottom: 2px solid #e5e7eb;
	background: transparent;
}

.nordsta-pricelist .npl-table tbody > tr.npl-expandable:hover > td,
.nordsta-pricelist .npl-table tbody > tr.npl-row.npl-open > td {
	background-color: #f9fafb;
}

.nordsta-pricelist .npl-breakdown th {
	border-bottom: 2px solid #e5e7eb;
}

.nordsta-pricelist .npl-breakdown tbody > tr:nth-child(odd) > td {
	background-color: #f9fafb;
}

.nordsta-pricelist .npl-breakdown tbody > tr:nth-child(even) > td {
	background-color: #ffffff;
}

.nordsta-pricelist .npl-detail-inner {
	background: #f9fafb;
}

.nordsta-pricelist button.npl-btn-near-me {
	background: transparent;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	color: #6b7280;
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
}

.nordsta-pricelist button.npl-btn-near-me:hover,
.nordsta-pricelist button.npl-btn-near-me:focus {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #374151;
}

.nordsta-pricelist button.npl-btn-near-me.active {
	background: #eff6ff;
	border-color: #93c5fd;
	color: #2563eb;
}

.nordsta-pricelist button.npl-tab {
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
}


.nordsta-pricelist button.npl-tab {
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	color: #374151;
}

.nordsta-pricelist button.npl-tab:hover,
.nordsta-pricelist button.npl-tab:focus {
	background: #e9eaec;
	border-color: #d1d5db;
	color: #374151;
}

.nordsta-pricelist button.npl-tab.active {
	background: #111827;
	border-color: #111827;
	color: #fff;
}

@media (max-width: 600px) {
	.nordsta-pricelist .npl-table tbody > tr.npl-row > td {
		background-color: transparent;
	}
	.nordsta-pricelist .npl-table tbody > tr.npl-detail > td {
		border: 0;
	}
	.nordsta-pricelist .npl-breakdown tbody > tr:nth-child(odd) > td,
	.nordsta-pricelist .npl-breakdown tbody > tr:nth-child(even) > td {
		background-color: transparent;
	}
}
