/* ==========================================================================
   Ezernams Booking - priekšgala stils
   Izmanto tās pašas CSS mainīgo krāsas, kas jau definētas mājaslapas
   Additional CSS (--ed-forest, --ed-amber u.c.). Ja tie nav definēti
   (piem., testējot uz citas lapas), tiek izmantotas fallback vērtības.
   ========================================================================== */

.eb-booking-widget {
	--eb-forest: var(--ed-forest, #2F4A3D);
	--eb-moss: var(--ed-moss, #5C8A5A);
	--eb-lake: var(--ed-lake, #2E6E82);
	--eb-amber: var(--ed-amber, #D9A441);
	--eb-charcoal: var(--ed-charcoal, #2B2B28);
	--eb-gray-alt: var(--ed-gray-alt, #F2F2F0);
	--eb-danger: #b3402d;

	max-width: 900px;
	margin: 0 auto;
	font-size: 16px;
	color: var(--eb-charcoal);
}

.eb-booking-loading {
	text-align: center;
	padding: 3rem 0;
	color: var(--eb-charcoal);
	opacity: 0.7;
}

/* --- Ierašanās/izbraukšanas kopsavilkuma josla --- */
.eb-selection-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: center;
	justify-content: space-between;
	background: #ffffff;
	border: 1px solid #e2e2e0;
	border-radius: 10px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
}

.eb-selection-summary .eb-selection-dates {
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
}

.eb-selection-summary .eb-selection-item strong {
	display: block;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--eb-moss);
	margin-bottom: 2px;
}

.eb-selection-summary .eb-selection-item span {
	font-size: 1.1rem;
	color: var(--eb-forest);
	font-weight: 600;
}

.eb-reset-selection {
	background: none;
	border: 1px solid var(--eb-forest);
	color: var(--eb-forest);
	border-radius: 4px;
	padding: 0.4rem 0.8rem;
	font-size: 0.85rem;
	cursor: pointer;
}
.eb-reset-selection:hover {
	background: var(--eb-forest);
	color: #fff;
}

/* --- Kalendārs (viena mēneša skats ar navigāciju) --- */
.eb-calendar-single {
	border: 1px solid #e2e2e0;
	border-radius: 10px;
	padding: 1rem;
	margin-bottom: 1.5rem;
	background: #fff;
}

.eb-month-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.eb-month-nav-btn {
	flex: 0 0 auto;
	background: var(--eb-gray-alt);
	border: none;
	border-radius: 6px;
	width: 36px;
	min-width: 36px;
	max-width: 36px;
	height: 36px;
	box-sizing: border-box;
	font-size: 1.1rem;
	color: var(--eb-forest);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease;
}
.eb-month-nav-btn:hover:not(:disabled) {
	background: var(--eb-amber);
	color: #fff;
}
.eb-month-nav-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.eb-month-title {
	flex: 1 1 auto;
	text-align: center;
	font-weight: 600;
	color: var(--eb-forest);
	font-size: 1.1rem;
}

.eb-weekdays,
.eb-days-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.eb-weekdays div {
	text-align: center;
	font-size: 0.75rem;
	color: var(--eb-charcoal);
	opacity: 0.6;
	padding-bottom: 4px;
}

.eb-day {
	position: relative;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	font-size: 0.85rem;
	border: none;
	background: var(--eb-gray-alt);
	color: var(--eb-charcoal);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.eb-day-number {
	pointer-events: none;
}

.eb-day-price-badge {
	position: absolute;
	top: 1px;
	right: 1px;
	font-size: 0.5rem;
	line-height: 1;
	padding: 1px 2px;
	border-radius: 3px;
	font-weight: 700;
	pointer-events: none;
	color: #fff;
}

.eb-day-price-badge.eb-day-price-up {
	background: var(--eb-danger, #b3402d);
}

.eb-day-price-badge.eb-day-price-down {
	background: var(--eb-moss, #5C8A5A);
}

.eb-price-legend {
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
	font-size: 0.8rem;
	color: var(--eb-charcoal);
	opacity: 0.8;
	margin: -0.75rem 0 1.5rem;
}
.eb-price-legend span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.eb-price-legend .eb-day-price-badge {
	display: inline-block;
	padding: 1px 3px;
}

.eb-day.eb-day-empty {
	background: transparent;
	cursor: default;
}

.eb-day.eb-day-past,
.eb-day.eb-day-booked {
	background: transparent;
	color: #c9c9c6;
	text-decoration: line-through;
	cursor: not-allowed;
}

.eb-day.eb-day-closed-checkin {
	background: repeating-linear-gradient(
		45deg,
		var(--eb-gray-alt),
		var(--eb-gray-alt) 4px,
		#e6d4c2 4px,
		#e6d4c2 8px
	);
}

.eb-day:not(.eb-day-empty):not(.eb-day-past):not(.eb-day-booked):hover {
	background: var(--eb-amber);
	color: #fff;
}

.eb-day.eb-day-selected-start,
.eb-day.eb-day-selected-end {
	background: var(--eb-forest);
	color: #fff;
	font-weight: 600;
}

.eb-day.eb-day-in-range {
	background: var(--eb-amber);
	color: #fff;
}

/* --- Forma --- */
.eb-booking-form {
	background: #fff;
	border: 1px solid #e2e2e0;
	border-radius: 10px;
	padding: 1.5rem;
}

.eb-booking-form.eb-form-disabled {
	opacity: 0.5;
	pointer-events: none;
}

/* Rezultāta bloks (veiksmes/kļūdas ziņojums ar saiti) VIENMĒR paliek klikšķināms,
   pat kad pārējā forma ir atspējota pēc veiksmīgas nosūtīšanas. */
.eb-booking-form.eb-form-disabled #eb-submit-result {
	opacity: 1;
	pointer-events: auto;
}

.eb-form-notice {
	text-align: center;
	padding: 1rem;
	color: var(--eb-charcoal);
	opacity: 0.7;
	font-style: italic;
}

.eb-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1rem;
}
.eb-form-row.eb-form-row-single {
	grid-template-columns: 1fr;
}

.eb-form-field-full {
	margin-bottom: 1rem;
}

.eb-form-field label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--eb-forest);
	margin-bottom: 0.3rem;
}

.eb-form-field input[type="text"],
.eb-form-field input[type="email"],
.eb-form-field input[type="tel"],
.eb-form-field input[type="number"],
.eb-form-field textarea {
	width: 100%;
	padding: 0.55rem 0.7rem;
	border: 1px solid #d7d7d4;
	border-radius: 6px;
	font-size: 0.95rem;
	box-sizing: border-box;
}

.eb-guest-type-toggle {
	display: flex;
	gap: 1.5rem;
	margin-bottom: 1rem;
}
.eb-guest-type-toggle label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
	cursor: pointer;
}

.eb-company-fields {
	border-left: 3px solid var(--eb-amber);
	padding-left: 1rem;
	margin-bottom: 1rem;
}
.eb-company-fields[hidden] {
	display: none;
}

.eb-services-list {
	margin-bottom: 1.25rem;
}

.eb-service-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 0;
	border-bottom: 1px solid #f0f0ee;
}
.eb-service-item:last-child {
	border-bottom: none;
}

.eb-service-item label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.eb-service-price {
	color: var(--eb-moss);
	font-size: 0.85rem;
}

.eb-service-qty {
	width: 60px;
	padding: 0.25rem 0.3rem;
	border: 1px solid #d7d7d4;
	border-radius: 4px;
	font-size: 0.85rem;
	text-align: center;
}
.eb-service-qty:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.eb-service-info-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--eb-lake, #2E6E82);
	color: #fff;
	font-size: 11px;
	cursor: help;
	margin-left: 2px;
}

/* --- Cenas kopsavilkuma tabula --- */
.eb-price-summary {
	background: var(--eb-gray-alt);
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
}

.eb-price-summary h3 {
	margin-top: 0;
	color: var(--eb-forest);
}

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

.eb-price-table th,
.eb-price-table td {
	padding: 0.4rem 0.5rem;
	text-align: right;
}
.eb-price-table th:first-child,
.eb-price-table td:first-child {
	text-align: left;
}

.eb-price-table thead th {
	border-bottom: 2px solid #d7d7d4;
	color: var(--eb-charcoal);
	opacity: 0.7;
	font-weight: 600;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.eb-price-table tbody tr {
	border-bottom: 1px solid #e6e6e3;
}

.eb-price-table tfoot tr td {
	padding-top: 0.5rem;
	font-weight: 600;
}

.eb-price-table tfoot .eb-price-subtotal-row td {
	border-top: 2px solid #d7d7d4;
	font-weight: 600;
	color: var(--eb-charcoal);
}

.eb-price-table tfoot .eb-price-total-row td {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--eb-forest);
	border-top: 1px solid #d7d7d4;
}

.eb-price-deposit-box {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1rem;
	padding-top: 0.75rem;
	border-top: 1px dashed #c9c9c6;
	color: var(--eb-lake);
	font-weight: 600;
}
.eb-price-deposit-box strong {
	font-size: 1.15rem;
}

.eb-price-deposit-box.eb-price-security-deposit {
	margin-top: 0.5rem;
	padding-top: 0;
	border-top: none;
	color: var(--eb-charcoal, #2B2B28);
	font-weight: 500;
	font-size: 0.9rem;
}
.eb-price-deposit-box.eb-price-security-deposit strong {
	font-size: 0.95rem;
}

.eb-price-deposit-box.eb-price-due-now-total {
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--eb-forest, #2F4A3D);
	color: var(--eb-forest, #2F4A3D);
}
.eb-price-deposit-box.eb-price-due-now-total strong {
	font-size: 1.25rem;
}

.eb-submit-button {
	width: 100%;
	background: var(--eb-amber);
	color: var(--eb-forest);
	border: none;
	border-radius: 6px;
	padding: 0.9rem 1.5rem;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}
.eb-submit-button:hover {
	background: var(--eb-forest);
	color: #fff;
}
.eb-submit-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.eb-form-error {
	color: var(--eb-danger);
	font-size: 0.9rem;
	margin-top: 0.5rem;
}

/* --- Rezervācijas statusa lapa ([ezernams_booking_status]) --- */
/* Atkārtoti izmanto tās pašas klases, kas jau definētas augstāk formas stilam
   (.eb-booking-widget, .eb-selection-summary, .eb-price-summary, .eb-price-table,
   .eb-form-notice) - papildus tikai statusa krāsu josla un bankas rekvizītu bloks. */

.eb-status-badge {
	display: inline-block;
	padding: 0.4rem 1rem;
	border-radius: 20px;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 1rem;
	color: #fff;
}
.eb-status-badge.eb-status-pending {
	background: var(--eb-amber, #D9A441);
}
.eb-status-badge.eb-status-confirmed {
	background: var(--eb-moss, #5C8A5A);
}
.eb-status-badge.eb-status-cancelled {
	background: var(--eb-danger, #b3402d);
}

.eb-bank-details {
	background: #fff;
	border: 1px solid #e2e2e0;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
	margin-top: 1.25rem;
	line-height: 1.6;
}

.eb-booking-status .eb-selection-summary {
	margin-bottom: 1.5rem;
}

.eb-cancellation-box {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px dashed #d7d7d4;
	text-align: center;
}

.eb-cancel-button {
	background: none;
	border: 1px solid var(--eb-danger, #b3402d);
	color: var(--eb-danger, #b3402d);
	border-radius: 6px;
	padding: 0.6rem 1.25rem;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.eb-cancel-button:hover:not(:disabled) {
	background: var(--eb-danger, #b3402d);
	color: #fff;
}
.eb-cancel-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.eb-submit-result {
	margin-top: 1.25rem;
	background: var(--eb-gray-alt);
	border-radius: 8px;
	padding: 1rem 1.25rem;
	font-size: 0.9rem;
}
.eb-submit-result pre {
	white-space: pre-wrap;
	word-break: break-word;
	background: #fff;
	padding: 0.75rem;
	border-radius: 6px;
	margin-top: 0.5rem;
}

/* --- Mobilajām ierīcēm --- */
@media (max-width: 600px) {
	.eb-form-row {
		grid-template-columns: 1fr;
	}
	.eb-selection-summary {
		flex-direction: column;
		align-items: flex-start;
	}
}
