/* assets/css/frontend-style.css */
.fwb-calendar-container {
	max-width: 640px;
	margin: 0 auto;
}

.fwb-form-status {
	font-weight: 600;
}

.fwb-booking {
	max-width: 720px;
	margin: 0 auto 3rem;
	padding: 1.5rem;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.fwb-booking-header h2 {
	margin-top: 0;
}

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

.fwb-calendar-nav__btn {
	background: var(--info-accent);
	color: #fff;
	border: none;
	padding: 0.5rem 0.75rem 0.7rem;
	line-height: 0.7;
	border-radius: 4px;
	cursor: pointer;
}

.fwb-calendar-month {
	font-weight: 700;
}

.fwb-calendar-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.fwb-calendar-table th,
.fwb-calendar-table td {
	border: 1px solid #dcdfe4;
	text-align: center;
	padding: 0;
	width: calc(100% / 7);
}

.fwb-calendar-table td.fwb-empty {
	background: #f7f8f9;
}

.fwb-date {
	padding: 0.75rem 0.5rem;
	width: 100%;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	font-weight: 600;
}

.fwb-date.fwb-available {
	background: #f4fbff;
	color: #1d2327;
}

.fwb-date.fwb-unavailable {
	background: #f9f9f9;
	color: #777;
	cursor: not-allowed;
}
.fwb-date.fwb-disabled {
	background: #f0f0f0;
	color: #bbb;
	cursor: not-allowed;
}

.fwb-date .fwb-mark {
	font-size: 1rem;
	font-weight: 700;
}

.fwb-date.fwb-available .fwb-mark {
	color: var(--info-accent);
}

.fwb-date.fwb-unavailable .fwb-mark {
	color: #d63638;
}
.fwb-date.fwb-disabled .fwb-mark {
	color: #bbb;
}

.fwb-date.selected,
.fwb-date.fwb-available:hover {
	background: var(--info-accent)!important;
	color: #fff;
}

.fwb-date.selected .fwb-mark,
.fwb-date.fwb-available:hover .fwb-mark {
	color: #fff;
}

.fwb-time-select {
	margin: 1.5rem 0 1rem;
}

.fwb-time-select select {
	margin-left: 0.5rem;
	min-width: 200px;
}

.fwb-product-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(140px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

[data-reservation-type="venue"] .fwb-product-grid {
	grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.fwb-product-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	padding: 0 0 1em 0;
	border: none;
	border-radius: 2px;
	text-align: left;
	transition: background-color 0.2s ease;
}

.fwb-product-card.is-selected {
	box-shadow: 0 0 0 2px #9b8440;
	background-color: #fffdf7;
}

@media (hover: hover) and (pointer: fine) {
	.fwb-product-card:hover {
		background-color: #fffdf7;
	}
}

.fwb-product-card__image img {
	width: 100%;
	max-width: 160px;
	height: auto;
	object-fit: cover;
	border-radius: 0px;
}

.fwb-product-card__label {
	color: #333;
	font-weight: 600;
	padding: 0 0.75rem;
	align-self: flex-start;
}

.fwb-product-card.is-selected .fwb-product-card__label {
	color: #333;
}

.fwb-product-card__price {
	align-self: flex-start;
	padding: 0 0.75rem;
	color: #71352b;
	font-size: 1.25rem;
	font-weight: 700;
}

.fwb-product-card__price span {
	font-size: 0.7rem;
	font-weight: 400;
}

.fwb-quantity {
	display: flex;
	align-items: center;
	align-self: flex-start;
	padding: 0 0.75rem;
}

.fwb-quantity__button,
.fwb-quantity__input {
	box-sizing: border-box;
	width: 38px;
	height: 38px;
	margin: 0;
	border: 1px solid #aa9a70;
	border-radius: 0;
	background: #fffdf7;
	text-align: center;
	font-size: 1rem;
}

.fwb-quantity__button {
	cursor: pointer;
	color: #443a26;
}

.fwb-quantity__button[data-action="increase"] {
	background: #897536;
	color: #fff;
}

.fwb-quantity__input {
	width: 70px;
	border-right: 0;
	border-left: 0;
	-moz-appearance: textfield;
}

.fwb-quantity__input::-webkit-inner-spin-button,
.fwb-quantity__input::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.fwb-quantity__unit {
	margin-left: 0.4rem;
	font-size: 0.85rem;
}

.fwb-booking-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.fwb-form-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}

.fwb-form-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.fwb-form-field--full {
	grid-column: 1 / -1;
}

.fwb-form-field label {
	font-weight: 600;
}

.fwb-form-field input,
.fwb-form-field textarea,
.fwb-form-field select {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #dcdfe4;
	border-radius: 4px;
	font-size: 1rem;
	background-color: #fff;
}

.fwb-form-field textarea {
	min-height: 120px;
	resize: vertical;
}

.fwb-required {
	margin-left: 0.5rem;
	color: #d63638;
	font-size: 0.85em;
}

.fwb-form-status {
	min-height: 1.25rem;
}

.fwb-form-actions {
	display: flex;
	justify-content: center;
	padding-top: 1.6rem;
}

.fwb-form-actions .button.button-primary {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 456px;
	min-height: 70px;
	padding: 1rem 4rem;
	border: 1px solid #64231B;
	border-radius: 2px;
	background: #64231B;
	color: #fff;
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.fwb-form-actions .button.button-primary::after {
	content: "";
	position: absolute;
	right: 1.5rem;
	width: 0.65rem;
	height: 0.65rem;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
}

.fwb-form-actions .button.button-primary:hover,
.fwb-form-actions .button.button-primary:focus-visible {
	border-color: #4d1b15;
	background: #4d1b15;
	color: #fff;
}

.fwb-form-actions .button.button-primary:focus-visible {
	outline: 2px solid #64231B;
	outline-offset: 3px;
}

.fwb-order-summary {
	border: 1px solid #b6a77c;
	background: #fffdf7;
	padding: 1rem 1.25rem;
}

.fwb-order-summary h3 {
	margin: 1.6rem 0!important;
	font-size: 1rem;
}

.fwb-order-summary__row,
.fwb-order-summary__total {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.35rem 0;
}

.fwb-order-summary__subtotal {
	margin-top: 0.5rem;
	padding-top: 0.65rem;
	border-top: 1px solid #ddd3b7;
	font-weight: 600;
}

.fwb-order-summary__total {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(275px, 0.9fr);
	align-items: center;
	gap: 1.5rem;
	margin-top: 0.6rem;
	padding-top: 0.75rem;
	border-top: 1px solid #ddd3b7;
}

.fwb-order-summary__total-amount {
	display: flex;
	align-items: baseline;
	gap: 0.35rem;
}

.fwb-order-summary__total-amount strong {
	margin-left: auto;
	color: #71352b;
	font-size: 1.6rem;
}

.fwb-order-summary__total-amount small {
	font-size: 0.75rem;
	white-space: nowrap;
}

.fwb-order-summary__additional-order-note {
	margin: 0;
	padding: 0.25rem 0 0.25rem 1.5rem;
	border-left: 1px solid #ddd3b7;
	color: #4d463c;
	font-size: 0.85rem;
	line-height: 1.7;
}

.fwb-order-summary__empty,
.fwb-order-summary__notice {
	margin: 0.35rem 0;
	color: #665f52;
	font-size: 0.85rem;
}

.fwb-error {
	color: #d63638;
}

.fwb-toast {
	position: fixed;
	top: 24px;
	left: 50%;
	z-index: 100000;
	max-width: calc(100vw - 32px);
	padding: 0.85rem 1.5rem;
	border-radius: 4px;
	background: #b32d2e;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
	color: #fff;
	font-weight: 600;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -16px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.fwb-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.fwb-product-card__image {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.fwb-product-card__image img {
	width: 100%;
	height: 100%!important;
	object-fit: cover;
}
#fwb-2-meal-fee-consent {
	width: auto;
}

#fwb-2-meal-fee-consent {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border: 1px solid #ff0000;
	border-radius: 3px;
	background: #fff;
	cursor: pointer;
	vertical-align: middle;
	position: relative;
	padding: 0;
	margin: 0 6px 4px 0;
}

#fwb-2-meal-fee-consent:checked {
	border-color: #0073aa;   /* チェック時の枠色 */
	background: #0073aa;     /* チェック時の背景色 */
}

#fwb-2-meal-fee-consent:checked::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 0px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

@media (max-width: 640px) {
	.fwb-booking {
		padding: 0;
		border: 0;
	}
	.fwb-quantity__button {
		width: 32px;
		height: 32px;
	}
	.fwb-quantity__input {
		width: 36px;
		height: 32px;
	}

	[data-reservation-type="restaurant"] .fwb-product-grid,
	[data-reservation-type="venue"] .fwb-product-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.fwb-form-fields {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}

	.fwb-order-summary__total {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}

	.fwb-order-summary__additional-order-note {
		padding: 0.75rem 0 0;
		border-top: 1px solid #ddd3b7;
		border-left: 0;
	}

	.fwb-order-summary__desktop-break {
		display: none;
	}

	.p-body table th, .p-body table td {
		padding: 4px 6px!important;
	}
}