/**
 * Blije Schaap Core - Rates & Services Widget Styles
 */

/* ==========================================================================
   Variables & Wrapper
   ========================================================================== */

.bsc-rates-services-wrapper {
	--bsc-rs-primary: #1b3254;
	--bsc-rs-success: #28a745;
	--bsc-rs-white: #ffffff;
	--bsc-rs-gray-50: #fafafa;
	--bsc-rs-gray-100: #f5f5f5;
	--bsc-rs-text: #333333;
	--bsc-rs-text-light: #666666;
	--bsc-rs-text-muted: #999999;
	--bsc-rs-border: #e0e0e0;
	--bsc-rs-border-light: #f0f0f0;
	--bsc-rs-radius: 10px;
	--bsc-rs-radius-lg: 12px;
	--bsc-rs-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	--bsc-rs-transition: 0.2s ease;

	width: 100%;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
	line-height: 1.6;
	color: var(--bsc-rs-text);
}

.bsc-rates-services-wrapper * {
	box-sizing: border-box;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.bsc-rs-section {
	margin-bottom: 32px;
}

.bsc-rs-section:last-child {
	margin-bottom: 0;
}

.bsc-rs-section-title {
	color: var(--bsc-rs-text);
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 20px 0;
	padding: 0 0 12px 0;
	border-bottom: 2px solid var(--bsc-rs-border-light);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.bsc-rs-card {
	background: var(--bsc-rs-white);
	border: 1px solid var(--bsc-rs-border-light);
	border-radius: var(--bsc-rs-radius-lg);
	margin-bottom: 12px;
	overflow: hidden;
	transition: box-shadow var(--bsc-rs-transition);
}

.bsc-rs-card:last-child {
	margin-bottom: 0;
}

.bsc-rs-card:hover {
	box-shadow: var(--bsc-rs-shadow);
}

/* ==========================================================================
   Season Group Card Header
   ========================================================================== */

.bsc-rs-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 20px;
	background: var(--bsc-rs-gray-50);
	border-bottom: 1px solid var(--bsc-rs-border-light);
}

.bsc-rs-season-name {
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--bsc-rs-text);
}

.bsc-rs-season-dates {
	font-size: 0.8rem;
	color: var(--bsc-rs-text-muted);
	background: var(--bsc-rs-white);
	padding: 4px 10px;
	border-radius: 20px;
	border: 1px solid var(--bsc-rs-border);
}

/* ==========================================================================
   Card Body
   ========================================================================== */

.bsc-rs-card-body {
	padding: 0;
}

/* ==========================================================================
   Price Table
   ========================================================================== */

.bsc-rs-price-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.bsc-rs-price-table thead th {
	padding: 12px 16px;
	text-align: center;
	font-weight: 600;
	font-size: 0.8rem;
	color: var(--bsc-rs-text-light);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-bottom: 1px solid var(--bsc-rs-border-light);
}

.bsc-rs-price-table thead th:first-child {
	text-align: left;
	padding-left: 20px;
}

.bsc-rs-price-table tbody td {
	padding: 12px 16px;
	text-align: center;
	border-bottom: 1px solid var(--bsc-rs-border-light);
}

.bsc-rs-price-table tbody tr:last-child td {
	border-bottom: none;
}

.bsc-rs-price-table tbody td:first-child {
	text-align: left;
	padding-left: 20px;
}

.bsc-rs-price-table tbody td.bsc-rs-price {
	font-weight: 700;
	color: var(--bsc-rs-primary);
	white-space: nowrap;
}

/* Package label cell */
.bsc-rs-package-label {
	font-weight: 600;
	color: var(--bsc-rs-text);
}

.bsc-rs-package-nights {
	display: block;
	font-weight: 400;
	font-size: 0.75rem;
	color: var(--bsc-rs-text-muted);
	margin-top: 1px;
}

/* ==========================================================================
   Note / Opmerking
   ========================================================================== */

.bsc-rs-note {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 16px;
	padding: 14px 18px;
	background: #f0f7ff;
	border: 1px solid #bdd8f5;
	border-radius: var(--bsc-rs-radius);
	color: #1a4d7c;
	font-size: 0.88rem;
	line-height: 1.5;
}

.bsc-rs-note-icon {
	flex-shrink: 0;
	font-size: 18px;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	color: #3b82f6;
}

.bsc-rs-note-text {
	flex: 1;
}

/* ==========================================================================
   Prices (generic)
   ========================================================================== */

.bsc-rs-price {
	font-weight: 700;
	font-size: 1rem;
	color: var(--bsc-rs-primary);
	white-space: nowrap;
}

.bsc-rs-price-free {
	color: var(--bsc-rs-success);
	font-weight: 600;
}

/* ==========================================================================
   Services Grid
   ========================================================================== */

.bsc-rs-services-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}

.bsc-rs-service-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	margin-bottom: 0;
}

.bsc-rs-service-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.bsc-rs-service-name {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--bsc-rs-text);
}

.bsc-rs-service-desc {
	font-size: 0.8rem;
	color: var(--bsc-rs-text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bsc-rs-service-pricing {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	flex-shrink: 0;
	margin-left: 16px;
}

.bsc-rs-service-conditions {
	font-size: 0.75rem;
	color: var(--bsc-rs-text-muted);
	text-align: right;
}

/* ==========================================================================
   Empty & Error States
   ========================================================================== */

.bsc-rs-empty {
	text-align: center;
	padding: 24px;
	color: var(--bsc-rs-text-muted);
	font-style: italic;
	background: var(--bsc-rs-gray-50);
	border-radius: var(--bsc-rs-radius);
}

.bsc-rs-error {
	text-align: center;
	padding: 30px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: var(--bsc-rs-radius-lg);
	color: #b91c1c;
}

/* ==========================================================================
   Editor Placeholder
   ========================================================================== */

.bsc-rates-services-wrapper.bsc-editor-mode {
	min-height: 300px;
}

.bsc-rs-placeholder {
	text-align: center;
	padding: 40px 30px;
	background: linear-gradient(135deg, var(--bsc-rs-gray-50) 0%, var(--bsc-rs-white) 100%);
	border: 2px dashed var(--bsc-rs-border);
	border-radius: var(--bsc-rs-radius-lg);
}

.bsc-rs-placeholder-icon {
	font-size: 48px;
	color: var(--bsc-rs-primary);
	margin-bottom: 16px;
	opacity: 0.8;
}

.bsc-rs-placeholder-icon .dashicons {
	font-size: inherit;
	width: auto;
	height: auto;
}

.bsc-rs-placeholder h3 {
	margin: 0 0 8px;
	color: var(--bsc-rs-primary);
	font-size: 1.2rem;
}

.bsc-rs-placeholder > p {
	margin: 0 0 24px;
	color: var(--bsc-rs-text-light);
	font-size: 0.9rem;
}

.bsc-rs-placeholder-note {
	font-style: italic;
	font-size: 0.8rem;
	color: var(--bsc-rs-text-muted);
	margin-top: 16px;
}

/* Editor preview table */
.bsc-rs-preview-table {
	text-align: left;
	margin-bottom: 16px;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

.bsc-rs-preview-table .bsc-rs-price-table {
	border: 1px solid var(--bsc-rs-border-light);
	border-radius: var(--bsc-rs-radius);
	overflow: hidden;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.bsc-rs-card-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	/* Allow horizontal scroll for wide price tables on tablet */
	.bsc-rs-card-body {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.bsc-rs-price-table thead th,
	.bsc-rs-price-table tbody td {
		padding: 10px 12px;
		font-size: 0.85rem;
	}

	.bsc-rs-price-table thead th:first-child,
	.bsc-rs-price-table tbody td:first-child {
		padding-left: 14px;
	}

	.bsc-rs-service-desc {
		white-space: normal;
	}
}

@media (max-width: 600px) {
	.bsc-rs-price-table thead th,
	.bsc-rs-price-table tbody td {
		padding: 10px 10px;
		font-size: 0.8rem;
	}

	.bsc-rs-price-table thead th:first-child,
	.bsc-rs-price-table tbody td:first-child {
		padding-left: 12px;
	}

	.bsc-rs-price-table tbody td.bsc-rs-price {
		font-size: 0.85rem;
	}

	.bsc-rs-service-card {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.bsc-rs-service-pricing {
		align-items: flex-start;
		margin-left: 0;
	}
}
