/* Drawer and Modal Styles for home-flip.php */

/* Bottom Drawer Styles */
.drawer-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.active {
	opacity: 1;
	visibility: visible;
}

.bottom-drawer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: #FFFFFF;
	border-top-left-radius: 24px;
	border-top-right-radius: 24px;
	box-shadow: 0px -10px 44px 0px #A1A1A140;
	z-index: 1001;
	transform: translate3d(0, 100%, 0);
	transition: transform 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
	max-height: 90vh;
	overflow-y: auto;
	/* GPU acceleration for smoother animations */
	will-change: transform;
	backface-visibility: hidden;
	/* Optimize rendering */
	contain: layout style paint;
}

.bottom-drawer.active {
	transform: translate3d(0, 0, 0);
}

/* Fullscreen drawer modifier - Optimized for performance */
.bottom-drawer.fullscreen {
	top: unset;
	bottom: 0;
	border-radius: 0;
	height: 100%;
	max-height: 100vh;
	transform: translateY(100%);
	/* Use GPU acceleration for smoother animations */
	will-change: transform;
	backface-visibility: hidden;
	/* Optimize rendering */
	transform: translate3d(0, 100%, 0);
}

.bottom-drawer.fullscreen.active {
	transform: translate3d(0, 0, 0);
}

.drawer-handle {
	display: flex;
	justify-content: center;
	padding: 12px 0;
	cursor: pointer;
	touch-action: none;
}

.drawer-handle-bar {
	width: 40px;
	height: 4px;
	background-color: #E7E7E7;
	border-radius: 2px;
}

.drawer-header {
	padding: 0 1rem 1rem 1rem;
	border-bottom: 1px solid #F0F0F0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.drawer-title {
	font-size: 18px;
	font-weight: 600;
	color: #2D3A45;
	margin: 0;
}

.drawer-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #757575;
	cursor: pointer;
	padding: 4px;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.drawer-close:hover {
	background-color: #F5F5F5;
}

.drawer-content {
	padding: 1rem;
	max-height: 400px;
	overflow-y: scroll;
	/* Optimize scrolling performance */
	-webkit-overflow-scrolling: touch;
	will-change: scroll-position;
}

/* Fullscreen drawer content optimization */
.fullscreen .drawer-content {
	height: calc(100% - 120px);
	overflow-y: auto;
	max-height: 100dvh;
	padding-bottom: 2rem;
	/* Better scrolling performance for large content */
	contain: layout style paint;
}

.drawer-section {
	margin-bottom: 1.5rem;
}

.drawer-section h3 {
	font-size: 16px;
	font-weight: 600;
	color: #2D3A45;
	margin: 0 0 0.75rem 0;
}

.drawer-buttons {
	display: flex;
	gap: 0.75rem;
	padding: 1rem;
	border-top: 1px solid #F0F0F0;
	background-color: #FFFFFF;
	position: sticky;
	bottom: 0;
}

.btn-reset {
	flex: 1;
	padding: 0.875rem;
	border: 1px solid #E7E7E7;
	background-color: #FFFFFF;
	color: #757575;
	border-radius: 8px;
	font-weight: 500;
	font-size: 14px;
}

.btn-apply {
	font-family: 'Samsung Sans';
	flex: 2;
	padding: 0.875rem;
	border: none;
	background-color: #FD6542;
	color: #FFFFFF;
	border-radius: 32px;
	font-weight: 500;
	font-size: 1rem;
}

.facility-checkbox {
	width: 18px;
	height: 18px;
	accent-color: #FD6542;
}

/* Counter Styles */
.counter-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	padding: 1.5rem;
	background-color: #F8F9FA;
	border-radius: 16px;
	margin: 1rem 0;
}

.counter-btn {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 2px solid #E7E7E7;
	background-color: #FFFFFF;
	color: #2D3A45;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 16px;
}

.counter-btn:hover {
	border-color: #FD6542;
	color: #FD6542;
	transform: scale(1.05);
}

.counter-btn:active {
	transform: scale(0.95);
}

.counter-btn:disabled {
	background-color: #F5F5F5;
	color: #CCCCCC;
	border-color: #E7E7E7;
	cursor: not-allowed;
	transform: none;
}

.counter-plus {
	background-color: #FD6542;
	color: #FFFFFF;
	border-color: #FD6542;
}

.counter-plus:hover {
	background-color: #E5593B;
	border-color: #E5593B;
	color: #FFFFFF;
}

.counter-display {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 100px;
	text-align: center;
}

.counter-number {
	font-size: 32px;
	font-weight: 700;
	color: #2D3A45;
	line-height: 1;
	margin-bottom: 4px;
}

.counter-label {
	font-size: 14px;
	font-weight: 500;
	color: #757575;
	text-transform: capitalize;
}

.counter-info {
	text-align: center;
	margin-top: 1rem;
}

.counter-info p {
	font-size: 12px;
	color: #9CA4AB;
	margin: 0;
	line-height: 1.4;
}

/* Bed Type Selection Styles */
.bed-options-container {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 1rem 0;
}

.bed-option {
	cursor: pointer;
	transition: all 0.2s ease;
}

.bed-option-card {
	display: flex;
	align-items: center;
	padding: 1rem;
	border: 2px solid #E7E7E7;
	border-radius: 12px;
	background-color: #FFFFFF;
	transition: all 0.2s ease;
}

.bed-option[data-selected="true"] .bed-option-card,
.bed-option-card:hover {
	border-color: #FD6542;
	background-color: #FFF8F6;
}

.bed-icon {
	flex-shrink: 0;
	width: 60px;
	display: flex;
	justify-content: center;
	align-items: center;
	color: #757575;
	transition: color 0.2s ease;
}

.bed-option[data-selected="true"] .bed-icon,
.bed-option-card:hover .bed-icon {
	color: #FD6542;
}

.bed-info {
	flex: 1;
	margin-left: 1rem;
}

.bed-info h4 {
	margin: 0 0 4px 0;
	font-size: 16px;
	font-weight: 600;
	color: #2D3A45;
}

.bed-info p {
	margin: 0;
	font-size: 12px;
	color: #757575;
	line-height: 1.4;
}

.bed-radio {
	flex-shrink: 0;
	margin-left: 1rem;
}

.bed-radio input[type="radio"] {
	width: 20px;
	height: 20px;
	accent-color: #FD6542;
	cursor: pointer;
}

/* Active state styling */
.bed-option[data-selected="true"] .bed-info h4 {
	color: #FD6542;
}

/* Disabled bed option styling */
.bed-option[data-disabled="true"] {
	pointer-events: none;
	opacity: 0.5;
}

.bed-option[data-disabled="true"] .bed-option-card {
	background-color: #F5F5F5;
	border-color: #CCCCCC;
	cursor: not-allowed;
}

.bed-option[data-disabled="true"] .bed-icon {
	color: #CCCCCC;
}

.bed-option[data-disabled="true"] .bed-info h4 {
	color: #CCCCCC;
}

.bed-option[data-disabled="true"] .bed-info p {
	color: #CCCCCC;
}

.bed-option[data-disabled="true"] .bed-radio input {
	cursor: not-allowed;
}

/* Calendar Styles */
.calendar-container {
	width: 100%;
	background-color: #FFFFFF;
}

.calendar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 0;
	margin-bottom: 1rem;
}

.calendar-nav {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #E7E7E7;
	background-color: #FFFFFF;
	color: #2D3A45;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.calendar-nav:hover {
	border-color: #FD6542;
	color: #FD6542;
	background-color: #FFF8F6;
}

.calendar-nav:active {
	transform: scale(0.95);
}

.calendar-title-container {
	flex: 1;
	text-align: center;
}

.calendar-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #2D3A45;
}

.calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	margin-bottom: 8px;
	padding: 0 4px;
}

.weekday {
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: #757575;
	padding: 8px 4px;
}

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	padding: 0 4px;
	margin-bottom: 1.5rem;
}

.calendar-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 500;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	background-color: #FFFFFF;
	color: #2D3A45;
	border: 1px solid transparent;
}

.calendar-day:hover:not(.disabled) {
	background-color: #ff73008a;
	border-color: #FD6542;
}

.calendar-day.other-month {
	color: #999999;
	cursor: pointer;
	opacity: 0.6;
}

.calendar-day.other-month:hover {
	opacity: 0.8;
	color: #666666;
}

.calendar-day.disabled {
	color: #CCCCCC;
	cursor: not-allowed;
	background-color: #F8F9FA;
}

.calendar-day.today {
	background-color: #E3F2FD;
	color: #1976D2;
	font-weight: 600;
}

.calendar-day.selected {
	background-color: #FD6542;
	color: #FFFFFF;
	font-weight: 600;
}

.calendar-day.range-start {
	background-color: #FD6542;
	color: #FFFFFF;
	font-weight: 600;
}

.calendar-day.range-end {
	background-color: #FD6542;
	color: #FFFFFF;
	font-weight: 600;
}

.calendar-day.in-range {
	background-color: #FFE8E3;
	color: #FD6542;
	font-weight: 500;
}

.calendar-day.range-start.in-range::after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 50%;
	height: 2px;
	background-color: #FFE8E3;
}

.calendar-day.range-end.in-range::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 50%;
	height: 2px;
	background-color: #FFE8E3;
}

.selected-range-display {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: #F8F9FA;
	border-radius: 12px;
	padding: 1rem;
	margin-bottom: 1rem;
}

.range-item {
	flex: 1;
	text-align: center;
}

.range-label {
	font-size: 12px;
	color: #757575;
	margin-bottom: 4px;
	font-weight: 500;
}

.range-value {
	font-size: 14px;
	color: #2D3A45;
	font-weight: 600;
}

.range-separator {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	margin: 0 1rem;
}

.nights-badge {
	background-color: #FD6542;
	color: #FFFFFF;
	padding: 4px 12px;
	border-radius: 16px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.calendar-info {
	text-align: center;
	margin-top: 1rem;
}

.calendar-info p {
	margin: 0;
	font-size: 12px;
	color: #757575;
	line-height: 1.4;
}

/* Hotel Search Drawer Styles */
.fullscreen-search-header {
	background-color: #FFFFFF;
	border-bottom: 1px solid #F0F0F0;
	position: sticky;
	top: 0;
	z-index: 10;
	padding: 0;
}

.search-header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1rem 0.5rem 1rem;
}

.search-header-title {
	font-size: 18px;
	font-weight: 600;
	color: #2D3A45;
	margin: 0;
	flex: 1;
	text-align: center;
	padding-right: 40px;
}

.search-drawer-input-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
	background-color: #F8F9FA;
	border: 1px solid #E7E7E7;
	border-radius: 8px;
	padding: 12px 16px;
	margin: 0 1rem 1rem 1rem;
}

.search-drawer-input-wrapper input {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 14px;
	font-weight: 500;
	color: #2D3A45;
	outline: none;
}

.search-drawer-input-wrapper input::placeholder {
	color: #9CA4AB;
}

.search-drawer-input-wrapper i {
	color: #757575;
	font-size: 18px;
}

.search-drawer-content {
	padding: 0;
}

.search-results-container {
	display: flex;
	flex-direction: column;
	row-gap: 2rem;
	/* Optimize for large lists */
	contain: layout style;
}

/* Optimize destination list performance */
.destination-list {
	list-style: none;
	margin: 0;
	padding: 0;
	/* Virtual scrolling optimization */
	contain: layout;
}

.popular-destinations-title {
	font-size: 1rem;
	font-weight: 600;
	color: #2D3A45;
	margin: 0 0 1rem 0;
	padding: 0 1rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}


.destination-item {
	padding: 0;
	margin: 0;
	border-bottom: 1px solid #F0F0F0;
}

.destination-item:last-child {
	border-bottom: none;
}

.destination-link {
	display: block;
	padding: 1rem;
	color: #2D3A45;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	transition: background-color 0.2s ease;
	position: relative;
}

.destination-link:hover {
	background-color: #F8F9FA;
}

.destination-link:active {
	background-color: #F0F0F0;
}

.destination-link i {
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	color: #CCCCCC;
	font-size: 12px;
}

.destination-nearby {
	color: #FD6542;
	font-weight: 600;
}

.destination-nearby i {
	color: #FD6542;
}

/* Fullscreen drawer specific header */
.fullscreen .drawer-header {
	display: none;
}

.fullscreen .drawer-handle {
	display: none;
}

.fullscreen .fullscreen-search-header {
	display: block !important;
}

.fullscreen .drawer-content {
	height: calc(100% - 120px);
	overflow-y: auto;
	max-height: 100dvh;
	padding-bottom: 2rem;
}

.fullscreen .drawer-buttons {
	display: none !important;
}

/* Close button in fullscreen search header */
.fullscreen-search-header .drawer-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #757575;
	cursor: pointer;
	padding: 4px;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fullscreen-search-header .drawer-close:hover {
	background-color: #F5F5F5;
}

/* Ensure drawer content doesn't overlap with search header */
.drawer-content#drawerContent:has(+ .search-drawer-header) {
	padding-top: 0 !important;
}

/* Dialog styles */
dialog {
	padding: 1rem;
	border-radius: 12px;
}

/* Desktop and Laptop Optimizations (1024px+) */
@media (min-width: 1024px) {
	/* Desktop drawer optimizations */
	.bottom-drawer {
		max-width: 600px;
		left: 50%;
		transform: translateX(-50%) translateY(100%);
		border-radius: 16px 16px 0 0;
		box-shadow: 0px -15px 60px 0px rgba(0, 0, 0, 0.15);
	}
	
	.bottom-drawer.active {
		transform: translateX(-50%) translateY(0);
	}
	
	.bottom-drawer.fullscreen {
		max-width: 800px;
		left: 50%;
		transform: translateX(-50%) translateY(100%);
		border-radius: 16px;
		height: 90vh;
		max-height: 90vh;
		top: 5vh;
		bottom: auto;
	}
	
	.bottom-drawer.fullscreen.active {
		transform: translateX(-50%) translateY(0);
	}
	
	/* Enhanced drawer header for desktop */
	.drawer-title {
		font-size: 20px;
	}
	
	.drawer-close {
		width: 36px;
		height: 36px;
		font-size: 20px;
	}
	
	/* Desktop counter optimizations */
	.counter-container {
		gap: 3rem;
		padding: 2rem;
		border-radius: 20px;
	}
	
	.counter-btn {
		width: 56px;
		height: 56px;
		font-size: 18px;
	}
	
	.counter-number {
		font-size: 36px;
	}
	
	.counter-label {
		font-size: 16px;
	}
	
	/* Desktop bed selection */
	.bed-option-card {
		padding: 1.25rem;
		border-radius: 16px;
	}
	
	.bed-icon {
		width: 80px;
	}
	
	.bed-info h4 {
		font-size: 18px;
	}
	
	.bed-info p {
		font-size: 14px;
	}
	
	/* Desktop calendar optimizations */
	.calendar-header {
		padding: 1.25rem 0;
		margin-bottom: 1.5rem;
	}
	
	.calendar-nav {
		width: 48px;
		height: 48px;
		font-size: 18px;
	}
	
	.calendar-title {
		font-size: 22px;
	}
	
	.calendar-day {
		font-size: 16px;
		border-radius: 12px;
	}
	
	.calendar-grid {
		gap: 4px;
		margin-bottom: 2rem;
	}
	
	.selected-range-display {
		padding: 1.5rem;
		border-radius: 16px;
		margin-bottom: 1.5rem;
	}
	
	.range-label {
		font-size: 14px;
	}
	
	.range-value {
		font-size: 16px;
	}
	
	.nights-badge {
		padding: 6px 16px;
		font-size: 14px;
	}
	
	/* Desktop drawer buttons */
	.drawer-buttons {
		padding: 1.5rem;
		gap: 1rem;
	}
	
	.btn-reset,
	.btn-apply {
		padding: 1rem 1.5rem;
		font-size: 16px;
		border-radius: 12px;
	}
}

/* Tablet Optimizations (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
	/* Tablet drawer optimizations */
	.bottom-drawer {
		max-width: 500px;
		left: 50%;
		transform: translateX(-50%) translateY(100%);
		border-radius: 16px 16px 0 0;
		box-shadow: 0px -10px 50px 0px rgba(0, 0, 0, 0.12);
	}
	
	.bottom-drawer.active {
		transform: translateX(-50%) translateY(0);
	}
	
	.bottom-drawer.fullscreen {
		max-width: 600px;
		left: 50%;
		transform: translateX(-50%) translateY(100%);
		border-radius: 16px;
		height: 85vh;
		max-height: 85vh;
		top: 7.5vh;
		bottom: auto;
	}
	
	.bottom-drawer.fullscreen.active {
		transform: translateX(-50%) translateY(0);
	}
	
	/* Enhanced tablet elements */
	.drawer-title {
		font-size: 18px;
	}
	
	.counter-container {
		gap: 2.5rem;
		padding: 1.5rem;
		border-radius: 18px;
	}
	
	.counter-btn {
		width: 52px;
		height: 52px;
		font-size: 17px;
	}
	
	.counter-number {
		font-size: 32px;
	}
	
	.counter-label {
		font-size: 15px;
	}
	
	.bed-option-card {
		padding: 1.125rem;
		border-radius: 14px;
	}
	
	.bed-icon {
		width: 70px;
	}
	
	.bed-info h4 {
		font-size: 17px;
	}
	
	.bed-info p {
		font-size: 13px;
	}
	
	/* Tablet calendar */
	.calendar-header {
		padding: 1rem 0;
		margin-bottom: 1.25rem;
	}
	
	.calendar-nav {
		width: 44px;
		height: 44px;
		font-size: 16px;
	}
	
	.calendar-title {
		font-size: 20px;
	}
	
	.calendar-day {
		font-size: 15px;
		border-radius: 10px;
	}
	
	.calendar-grid {
		gap: 3px;
		margin-bottom: 1.75rem;
	}
	
	.selected-range-display {
		padding: 1.25rem;
		border-radius: 14px;
		margin-bottom: 1.25rem;
	}
	
	.range-label {
		font-size: 13px;
	}
	
	.range-value {
		font-size: 15px;
	}
	
	.nights-badge {
		padding: 5px 14px;
		font-size: 13px;
	}
	
	/* Tablet drawer buttons */
	.drawer-buttons {
		padding: 1.25rem;
		gap: 0.875rem;
	}
	
	.btn-reset,
	.btn-apply {
		padding: 0.875rem 1.25rem;
		font-size: 15px;
		border-radius: 10px;
	}
}

/* Responsive adjustments for medium mobile devices */
@media (max-width: 576px) {
	.bottom-drawer {
		max-height: 95vh;
	}

	.counter-container {
		gap: 1.5rem;
		padding: 1rem;
	}

	.counter-btn {
		width: 44px;
		height: 44px;
	}

	.counter-number {
		font-size: 28px;
	}

	.bed-option-card {
		padding: 0.875rem;
	}

	.bed-icon {
		width: 50px;
	}

	.bed-info h4 {
		font-size: 15px;
	}

	.bed-info p {
		font-size: 11px;
	}

	/* Calendar mobile adjustments */
	.calendar-header {
		padding: 0.75rem 0;
		margin-bottom: 0.75rem;
	}

	.calendar-nav {
		width: 36px;
		height: 36px;
	}

	.calendar-title {
		font-size: 16px;
	}

	.calendar-day {
		font-size: 13px;
	}

	.selected-range-display {
		padding: 0.75rem;
	}

	.range-value {
		font-size: 13px;
	}
}