/* Domek Booking – style formularza rezerwacji na stronie produktu */

.dbk-booking {
	margin: 20px 0;
	padding: 20px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fafafa;
	max-width: 720px;
}

.dbk-title {
	margin-top: 0;
}

.dbk-field {
	margin-bottom: 15px;
}

.dbk-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.dbk-field select {
	max-width: 220px;
}

/* Nawigacja kalendarza */
.dbk-nav {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
}

.dbk-nav-btn {
	background: #e77c00 !important;
	color: #fff !important;
	border: 2px solid #e77c00 !important;
	border-radius: 50% !important;
	width: 38px;
	height: 38px;
	font-size: 30px;
	font-weight: 400;
	line-height: 30px;
	padding: 0 !important;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.dbk-nav-btn:hover {
	background: #c96800 !important;
	border-color: #c96800 !important;
	color: #fff !important;
}

/* Miesiące */
.dbk-months {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
}

.dbk-month {
	flex: 1 1 260px;
	min-width: 260px;
}

.dbk-month-title {
	text-align: center;
	font-weight: 600;
	margin-bottom: 8px;
	text-transform: capitalize;
}

.dbk-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.dbk-dayname {
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	color: #777;
	padding: 4px 0;
}

.dbk-day {
	appearance: none;
	border: 1px solid transparent;
	background: #fff;
	border-radius: 4px;
	padding: 7px 0;
	text-align: center;
	font-size: 13px;
	cursor: pointer;
	color: #222;
}

.dbk-day:hover:not(:disabled) {
	border-color: #2271b1;
}

.dbk-day.dbk-empty {
	background: transparent;
	cursor: default;
	pointer-events: none;
}

.dbk-day.dbk-disabled {
	background: #f2f2f2;
	color: #bbb;
	cursor: not-allowed;
}

.dbk-day.dbk-booked {
	background: #f8d7da;
	color: #b02a37;
	text-decoration: line-through;
}

.dbk-day.dbk-in-range {
	background: #d3e4f4;
	color: #0f4c81;
}

.dbk-day.dbk-range-start,
.dbk-day.dbk-range-end {
	background: #2271b1;
	color: #fff;
	font-weight: 700;
}

/* Podsumowanie wyceny */
.dbk-summary {
	margin: 15px 0;
	padding: 12px 15px;
	background: #fff;
	border: 1px solid #d8e2ec;
	border-radius: 6px;
}

.dbk-summary-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 0;
}

.dbk-summary-row .amount {
	font-weight: inherit;
}

.dbk-deposit-row {
	border-top: 1px dashed #ccd6e0;
	margin-top: 6px;
	padding-top: 8px;
	font-size: 1.05em;
}

/* Przycisk i komunikaty */
#dbk-book-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.dbk-message {
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 6px;
	display: none;
}

.dbk-message.dbk-error {
	background: #f8d7da;
	color: #842029;
	border: 1px solid #f5c2c7;
}

.dbk-message.dbk-info {
	background: #cff4fc;
	color: #055160;
	border: 1px solid #b6effb;
}


/* Ceny za noc – mała chmurka pojawiająca się po najechaniu na dostępny dzień. */
.dbk-day {
	position: relative;
	overflow: visible !important;
}

.dbk-price-bubble {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%) translateY(4px);
	padding: 5px 8px;
	background: #e77c00;
	color: #fff;
	border-radius: 7px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
	z-index: 30;
	box-shadow: 0 3px 10px rgba(0,0,0,.16);
}

.dbk-price-bubble::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 100%;
	transform: translateX(-50%);
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid #e77c00;
}

.dbk-day:hover .dbk-price-bubble,
.dbk-day:focus-visible .dbk-price-bubble {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.dbk-day.dbk-booked .dbk-price-bubble,
.dbk-day.dbk-disabled .dbk-price-bubble {
	display: none;
}

@media (max-width: 700px) {
	.dbk-price-bubble {
		font-size: 10px;
		padding: 4px 6px;
	}
}


/* Ukryj standardowy formularz WooCommerce na stronach domków.
 * Rezerwacja jest obsługiwana wyłącznie przez formularz DBK.
 */
/*
 * Ukryj standardowy formularz WooCommerce dla produktu-rezerwacji.
 * Nie opieramy się wyłącznie na form.cart, ponieważ część motywów
 * dodaje własne klasy/containery. Własny formularz DBK nie używa
 * elementu .cart, więc pozostaje bez zmian.
 */
body.dbk-bookable-product form.cart,
body.dbk-bookable-product .cart,
body.dbk-bookable-product .woocommerce-variation-add-to-cart,
body.dbk-bookable-product .single_variation_wrap {
    display: none !important;
}

/* Własny przycisk rezerwacji DBK pozostaje widoczny. */
body.dbk-bookable-product .dbk-booking #dbk-book-btn {
    display: inline-flex !important;
}

/* Informacja dla klienta po wybraniu opcji 6+. */
.dbk-message.dbk-info {
	white-space: pre-line;
}
