/* Redcat Booking Panel Styles */
/* Overlay - positioned separately to not interfere with panel content */
.booking-panel-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.redcat-booking-panel.active .booking-panel-overlay {
	opacity: 1;
	visibility: visible;
}

/* Panel Base */
.redcat-booking-panel {
	position: fixed;
	top: 0;
	right: -400px;
	/* Hidden by default */
	width: 400px;
	height: 100vh;
	background: #ffffff;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
	transition: right 0.3s ease;
	overflow-y: auto;
	z-index: 9999;
}

.redcat-booking-panel.active {
	right: 0;
	/* Slide in when active */
}

/* Panel Content - ensure it's above overlay */
.booking-panel-content {
	height: 100%;
	display: flex;
	flex-direction: column;
	position: relative;
	z-index: 10000;
	/* Higher than overlay */
	background: #ffffff;
	/* Ensure solid background */
}

/* Header */
.booking-panel-header {
	padding: 20px;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--wp--preset--color--primary);
	color: #fff;
}

.booking-panel-header .booking-panel-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
}

.booking-panel-header .booking-panel-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	padding: 5px;
	line-height: 1;
}

.booking-panel-header .booking-panel-close:hover {
	/*    opacity: 0.7; */
}

/* Tabs */
.booking-panel-tabs {
	display: flex;
	border-bottom: 1px solid #eee;
}

.booking-tab {
	flex: 1;
	padding: 15px;
	background: #f5f5f5;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.3s ease;
}

.booking-tab.active {
	background: #fff;
	border-bottom-color: var(--wp--preset--color--primary);
}

.booking-tab:hover {
	background: #f0f0f0;
}

/* Content Area */
.booking-panel-content-area {
	flex: 1;
	overflow-y: auto;
}

.booking-content {
	display: none;
	padding: 20px;
}

.booking-content.active {
	display: block;
}

/* Section Headers */
.booking-section-header h3 {
	font-size: 20px;
	color: var(--wp--preset--color--black);
	margin: 0 0 10px 0;
}

.booking-section-header p {
	font-family: var(--wp--preset--font-family--hk-grotesk);
	color: var(--wp--preset--color--black);
	margin: 0 0 20px 0;
	line-height: 1.4;
}

/* Placeholder */
.booking-placeholder {
	text-align: center;
	padding: 40px 20px;
	color: #666;
}

.booking-placeholder h4 {
	margin: 20px 0 10px 0;
	font-size: 16px;
}

.booking-placeholder p {
	margin: 0 0 5px 0;
}

.booking-placeholder small {
	font-size: 12px;
	color: #999;
}

.booking-placeholder .placeholder-icon {
	line-height: 0
}

.booking-placeholder .placeholder-icon svg {
	width: 48px;
	height: 48px;
}


/* Table Iframe Container */
.table-iframe-container {
	width: 100%;
	margin: 0;
	padding: 0;
}

.table-iframe-container iframe {
	width: 100%;
	border: none;
	border-radius: 4px;
	min-height: 400px;
	background: #f9f9f9;
}

.table-iframe-container iframe[height] {
	height: auto;
	min-height: 300px;
}

/* Responsive iframe handling */
.table-iframe-container {
	position: relative;
	overflow: hidden;
}

/* If iframe doesn't have explicit dimensions, create responsive container */
.table-iframe-container iframe:not([width]):not([height]) {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.table-iframe-container:has(iframe:not([width]):not([height])) {
	position: relative;
	width: 100%;
	height: 0;
	padding-bottom: 56.25%;
	/* 16:9 aspect ratio */
}

/* Party Shortcode Container */
.party-shortcode-container {
	width: 100%;
	margin: 0;
	padding: 0;
}

.party-shortcode-container form {
	width: 100%;
}

.party-shortcode-container .wpcf7 {
	width: 100%;
}

.party-shortcode-container input,
.party-shortcode-container textarea,
.party-shortcode-container select {
	width: 100%;
	max-width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	margin-bottom: 10px;
}

.party-shortcode-container input[type="submit"] {
	background: #000;
	color: #fff;
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
	transition: background 0.3s ease;
}

.party-shortcode-container input[type="submit"]:hover {
	background: #333;
}

/* Shortcode loading and error states */
.shortcode-loading {
	text-align: center;
	padding: 40px 20px;
	color: #666;
	font-style: italic;
}

.shortcode-error {
	text-align: center;
	padding: 40px 20px;
	color: #e74c3c;
	background: #ffeaea;
	border-radius: 4px;
	border: 1px solid #f5c6cb;
}

/* Form Styles */
.room-booking-form {
	max-width: 100%;
	margin-top: 15px;
}

.room-booking-form .form-group {
	margin-bottom: 20px;
}

.room-booking-form .form-label {
	font-size: 15px;
	font-weight: 600;
	color: var(--wp--preset--color--black);
	display: block;
	margin-bottom: 6px;
	line-height: 1.45;
}

.room-booking-form .required {
	color: #E74C3C;
}

.room-booking-form .form-input {
	color: var(--wp--preset--color--black);
	width: 100%;
	padding: 12px;
	border: 2px solid #ddd;
	border-radius: 4px;
	font-size: 15px;
	transition: border-color 0.3s ease;
	box-sizing: border-box;
	/* Ensure proper sizing */
}

.room-booking-form .form-input:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
}

/* Date Inputs */
.date-inputs {
	display: flex;
	gap: 10px;
	align-items: center;
}

.date-input-group {
	flex: 1;
}

.date-label {
	font-size: 12px;
	color: #000000;
	margin-top: 5px;
}

.date-separator {
	/*    font-size: 18px; */
	color: #000000;
	line-height: 0;
	position: relative;
	top: -16px
}

.date-separator svg {
	width: 18px;
	height: 18px;
}

/* Form Row */
.form-row {
	display: flex;
	gap: 15px;
}

.form-row .form-group {
	flex: 1;
}

/* Submit Button */
.form-submit {
	margin-top: 30px;
}

.booking-submit-btn {
	width: 100%;
	padding: 15px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.booking-submit-btn:hover {
	background: var(--wp--preset--color--primary);
}

/* Footer */
.booking-panel-footer {
	padding: 20px;
	border-top: 1px solid #eee;
	background: #f9f9f9;
	text-align: center;
}

.booking-footer-text {
	margin: 0;
	font-size: 14px;
	color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.redcat-booking-panel {
		width: 100%;
		right: -100%;
	}

	/* Adjust tab layout for 3 tabs on mobile */
	.booking-tab {
		padding: 12px 8px;
		font-size: 13px;
		text-align: center;
	}

	.booking-tab svg {
		display: block;
		margin: 0 auto 5px auto;
		width: 16px;
		height: 16px;
	}

	.date-inputs {
		flex-direction: column;
		gap: 15px;
	}

	.date-separator {
		transform: rotate(90deg);
	}

	.form-row {
		flex-direction: column;
		gap: 20px;
	}

	/* Mobile iframe adjustments */
	.table-iframe-container iframe {
		min-height: 300px;
	}

	/* Party shortcode mobile adjustments */
	.party-shortcode-container input,
	.party-shortcode-container textarea,
	.party-shortcode-container select {
		padding: 12px;
		font-size: 16px;
		/* Prevent zoom on iOS */
		margin-bottom: 15px;
	}
}

/* Extra small screens - stack tabs if needed */
@media (max-width: 480px) {
	.booking-tab {
		padding: 10px 5px;
		font-size: 12px;
	}

	.booking-tab svg {
		width: 14px;
		height: 14px;
	}
}