/* SC-ICG Booking — 前台訂房日曆 */

.sc-icg-booking-widget {
	--scb-primary: #28333B;
	--scb-accent: #0A6EB1;
	--scb-accent-10: rgba(10, 110, 177, 0.10);
	--scb-accent-20: rgba(10, 110, 177, 0.20);
	--scb-border: rgba(40, 51, 59, 0.12);
	--scb-muted: rgba(40, 51, 59, 0.45);
	--scb-danger: #C4392A;

	width: 100%;
	max-width: 480px;
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.5;
	/* 佈景主題常見的寬字距/行高會撐爆日曆格線，這裡一律歸零 */
	letter-spacing: normal;
}

.sc-icg-booking-widget * {
	letter-spacing: inherit;
	box-sizing: border-box;
}

/* 隱藏 Woo 預設數量欄位（房間數改由 widget 控制） */
form.cart:has(.sc-icg-booking-widget) .quantity {
	display: none !important;
}

.sc-icg-booking-widget .scb-cal {
	position: relative;
	border: 1px solid var(--scb-border);
	border-radius: 12px;
	padding: 14px;
	background: #fff;
	overflow: hidden;
}

.sc-icg-booking-widget .scb-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.sc-icg-booking-widget select.scb-cal-title {
	font-weight: 600;
	font-size: 15px;
	font-family: inherit;
	color: var(--scb-primary);
	background: #fff;
	border: 1px solid var(--scb-border);
	border-radius: 8px;
	padding: 6px 30px 6px 12px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2328333B' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	transition: border-color 0.15s ease;
}

.sc-icg-booking-widget select.scb-cal-title:hover,
.sc-icg-booking-widget select.scb-cal-title:focus {
	border-color: var(--scb-accent);
	outline: none;
}

.sc-icg-booking-widget .scb-nav {
	width: 34px;
	height: 34px;
	border: 1px solid var(--scb-border);
	border-radius: 8px;
	background: #fff;
	color: var(--scb-primary);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.sc-icg-booking-widget .scb-nav:hover {
	background: var(--scb-accent-10);
	border-color: var(--scb-accent);
}

.sc-icg-booking-widget .scb-cal-grid {
	display: grid;
	/* minmax(0, 1fr) 讓欄寬固定為 1/7，內容過寬時裁切而不是撐爆格線 */
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 3px;
}

.sc-icg-booking-widget .scb-dow {
	text-align: center;
	font-size: 11px;
	color: var(--scb-muted);
	padding: 4px 0;
}

.sc-icg-booking-widget .scb-cell {
	min-width: 0;
	min-height: 52px;
	border-radius: 8px;
	padding: 4px 2px;
	text-align: center;
	cursor: pointer;
	border: 1px solid transparent;
	overflow: hidden;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.sc-icg-booking-widget .scb-cell:hover:not(.scb-disabled):not(.scb-pad) {
	border-color: var(--scb-accent);
	background: var(--scb-accent-10);
}

.sc-icg-booking-widget .scb-pad {
	cursor: default;
}

.sc-icg-booking-widget .scb-disabled {
	cursor: default;
	opacity: 0.38;
}

.sc-icg-booking-widget .scb-closed .scb-day-num {
	text-decoration: line-through;
}

.sc-icg-booking-widget .scb-day-num {
	font-weight: 600;
	color: var(--scb-primary);
	font-size: 13px;
	line-height: 1.4;
}

.sc-icg-booking-widget .scb-day-price {
	font-size: 10.5px;
	color: var(--scb-accent);
	white-space: nowrap;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
}

.sc-icg-booking-widget .scb-day-rem {
	font-size: 10px;
	color: var(--scb-muted);
	white-space: nowrap;
	line-height: 1.4;
}

.sc-icg-booking-widget .scb-day-full {
	font-size: 10px;
	color: var(--scb-danger);
}

.sc-icg-booking-widget .scb-start,
.sc-icg-booking-widget .scb-end {
	background: var(--scb-accent);
	border-color: var(--scb-accent);
}

.sc-icg-booking-widget .scb-start .scb-day-num,
.sc-icg-booking-widget .scb-start .scb-day-price,
.sc-icg-booking-widget .scb-start .scb-day-rem,
.sc-icg-booking-widget .scb-end .scb-day-num,
.sc-icg-booking-widget .scb-end .scb-day-price,
.sc-icg-booking-widget .scb-end .scb-day-rem {
	color: #fff;
}

.sc-icg-booking-widget .scb-range {
	background: var(--scb-accent-20);
}

.sc-icg-booking-widget .scb-cal-loading {
	display: none;
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.75);
	border-radius: 12px;
	text-align: center;
	padding-top: 90px;
	color: var(--scb-muted);
}

.sc-icg-booking-widget .scb-error {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--scb-danger);
	padding: 24px 0;
}

/* 摘要區 */
.sc-icg-booking-widget .scb-summary {
	margin-top: 12px;
	border: 1px solid var(--scb-border);
	border-radius: 12px;
	padding: 12px 16px;
	background: #fff;
}

.sc-icg-booking-widget .scb-summary-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 0;
}

.sc-icg-booking-widget .scb-summary-row + .scb-summary-row {
	border-top: 1px solid var(--scb-border);
}

.sc-icg-booking-widget .scb-summary-dates {
	font-weight: 500;
	color: var(--scb-primary);
}

.sc-icg-booking-widget .scb-summary-nights {
	color: var(--scb-muted);
	font-size: 13px;
}

.sc-icg-booking-widget .scb-qty-select {
	min-width: 110px;
	padding: 6px 10px;
	border: 1px solid var(--scb-border);
	border-radius: 8px;
}

.sc-icg-booking-widget .scb-total {
	font-size: 18px;
	color: var(--scb-accent);
}

.sc-icg-booking-widget .scb-hint {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--scb-muted);
}

@media (max-width: 480px) {
	.sc-icg-booking-widget {
		max-width: 100%;
	}
	.sc-icg-booking-widget .scb-cell {
		min-height: 48px;
	}
}
