/**
 * Hostaway Direct Booking - Frontend styles
 * Sailing theme design system: Roboto (body), Crimson Text (headings)
 * Colors: #2a2a2a (headings), #5a5a5a (body), #2eb0d1 (accent), #258da7 (hover)
 */

/* Single listing header banner – matches Our Listings design */
.hostaway-listing-banner {
	position: relative;
}
.hostaway-listing-banner .elementor-heading-title {
	font-family: inherit;
	font-size: 2.5rem;
	font-weight: 600;
}
@media (max-width: 768px) {
	.hostaway-listing-banner {
		min-height: 200px !important;
	}
	.hostaway-listing-banner .elementor-heading-title {
		font-size: 1.75rem;
	}
}

/* Listings grid – 3 cards per row, Sailing theme compatible */
.hostaway-listings {
	max-width: 1600px;
	margin: 0 auto;
	padding: 1.5rem 12px;
	font-family: Roboto, sans-serif;
	font-size: 15px;
	font-weight: 300;
	line-height: 1.6;
	color: #5a5a5a;
}

.hostaway-listings-header {
	margin-bottom: 1.5rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.hostaway-listings-count {
	font-size: 15px;
	color: #5a5a5a;
	margin: 0;
	font-weight: 300;
}

/* View toggle – right top */
.hostaway-view-toggle {
	display: flex;
	gap: 0;
}

.hostaway-view-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid #e0e0e0;
	color: #5a5a5a;
	font-size: 14px;
	font-family: Roboto, sans-serif;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.hostaway-view-btn:first-child {
	border-radius: 4px 0 0 4px;
	border-right: none;
}

.hostaway-view-btn:last-child {
	border-radius: 0 4px 4px 0;
}

.hostaway-view-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.hostaway-view-btn:hover {
	background: #f5f5f5;
	color: #2a2a2a;
}

.hostaway-view-btn.active {
	background: #2eb0d1;
	color: #fff;
	border-color: #2eb0d1;
}

/* 3 columns – matches theme .rooms.hb-catalog-column-3 */
.hostaway-listings-grid.rooms {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	clear: both;
	overflow: hidden;
}

.hostaway-listings-grid.rooms > .hb_room {
	width: 33.33%;
	box-sizing: border-box;
	position: relative;
	margin: 0 0 30px;
	padding: 0 8px;
	border: none;
	list-style: none;
	display: flex;
	align-items: stretch;
}

@media (max-width: 991px) {
	.hostaway-listings-grid.rooms > .hb_room {
		width: 50%;
	}
}

@media (max-width: 575px) {
	.hostaway-listings-grid.rooms > .hb_room {
		width: 100%;
	}
}

/* List view */
.hostaway-listings-grid.hostaway-list-view {
	flex-direction: column;
}

.hostaway-listings-grid.hostaway-list-view > .hb_room {
	width: 100% !important;
}

.hostaway-listings-grid.hostaway-list-view .hostaway-listing-card .summary {
	flex-direction: row;
}

.hostaway-listings-grid.hostaway-list-view .hostaway-listing-card .media {
	width: 280px;
	min-width: 280px;
	aspect-ratio: 4/3;
	border-radius: 8px 0 0 8px;
}

.hostaway-listings-grid.hostaway-list-view .hostaway-listing-card .content-room {
	flex: 1;
	justify-content: center;
}

@media (max-width: 575px) {
	.hostaway-listings-grid.hostaway-list-view .hostaway-listing-card .summary {
		flex-direction: column;
	}
	.hostaway-listings-grid.hostaway-list-view .hostaway-listing-card .media {
		width: 100%;
		min-width: 100%;
		aspect-ratio: 16/10;
		border-radius: 8px 8px 0 0;
	}
}

.hostaway-listing-card .summary {
	position: relative;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.3s;
	display: flex;
	flex-direction: column;
	width: 100%;
	border-radius: 8px;
}

.hostaway-listing-card:hover .summary {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.hostaway-listing-card .media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16/10;
	background: #f5f5f5;
	flex-shrink: 0;
	border-radius: 8px 8px 0 0;
}

.hostaway-listing-card .media a {
	display: block;
}

.hostaway-listing-card .media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s;
}

.hostaway-listing-card:hover .media img {
	transform: scale(1.03);
}

.hostaway-listing-card .content-room {
	padding: 20px 15px;
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: visible;
	min-height: auto;
}

/* Title – full post title shown, no truncation or line limit */
.hostaway-listings .hostaway-listing-card .title,
.hostaway-listings .hostaway-listing-card .title-room {
	overflow: visible !important;
}

.hostaway-listings .hostaway-listing-card .title h4,
.hostaway-listings .hostaway-listing-card .title-room h4 {
	margin: 0 0 10px;
	font-family: Crimson Text, serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: #2a2a2a;
	overflow: visible !important;
	white-space: normal !important;
	word-wrap: break-word;
	word-break: break-word;
	text-overflow: clip !important;
	-webkit-line-clamp: unset !important;
	display: block;
}

.hostaway-listings .hostaway-listing-card .title h4 a,
.hostaway-listings .hostaway-listing-card .title-room h4 a {
	color: #2a2a2a;
	text-decoration: none;
	transition: color 0.2s;
	display: block !important;
	overflow: visible !important;
	white-space: normal !important;
	word-wrap: break-word;
	word-break: break-word;
	text-overflow: clip !important;
	max-width: none !important;
}

.hostaway-listing-card .title h4 a:hover {
	color: #2eb0d1;
}

.hostaway-listing-card .description.location {
	font-size: 14px;
	color: #5a5a5a;
	margin: 0 0 12px;
	line-height: 1.5;
}

.hostaway-listing-card .hostaway-listings-card-meta {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	font-size: 14px;
	color: #5a5a5a;
}

.hostaway-listing-card .hostaway-listings-card-meta li {
	display: flex;
	align-items: center;
	gap: 4px;
}

.hostaway-listing-card .hostaway-listings-card-meta .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #2eb0d1;
}

/* Price – theme accent #2eb0d1 */
.hostaway-listing-card .price {
	margin: 0 0 15px;
	font-size: 18px;
	font-weight: 600;
	color: #2eb0d1;
}

.hostaway-listing-card .price .title-price {
	font-size: 14px;
	font-weight: 400;
	color: #2a2a2a;
	margin-right: 4px;
}

.hostaway-listing-card .price .unit {
	font-size: 14px;
	font-weight: 400;
	color: #5a5a5a;
}

.hostaway-listing-card .price .unit:before {
	content: "/ ";
}

/* Button – theme #2eb0d1, hover #258da7 */
.hostaway-listing-card .hostaway-listings-card-btn {
	display: inline-block;
	padding: 10px 20px;
	background: #2eb0d1;
	color: #fff;
	text-decoration: none;
	border: none;
	border-radius: 3px;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	transition: background 0.2s, color 0.2s;
	margin-top: auto;
}

.hostaway-listing-card .hostaway-listings-card-btn:hover {
	background: #258da7;
	color: #fff;
}

/* Pagination – theme colors */
.hostaway-listings-pagination {
	margin-top: 2rem;
	text-align: center;
}

.hostaway-listings-pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	margin: 0 4px;
	border: none;
	border-radius: 3px;
	text-decoration: none;
	font-size: 15px;
	color: #2a2a2a;
	background: #e7e7e7;
	transition: background 0.2s, color 0.2s;
}

.hostaway-listings-pagination .page-numbers.current,
.hostaway-listings-pagination .page-numbers:hover {
	background: #2eb0d1;
	color: #fff;
}

/* Single listing – hostaway-connector structure (haway-*) */
.hostaway-single-content {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px 40px;
}

.haway-gallery-wrapper {
	position: relative;
	margin-bottom: 30px;
	max-width: 1400px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 50px;
}

.haway-gallery {
	overflow: hidden;
	border-radius: 12px;
}

/* Before slider JS runs: show only first slide (prevents stacked "one by one" on slow load) */
.haway-gallery.slider > div {
	display: none;
}
.haway-gallery.slider > div:first-child {
	display: block;
}

.haway-gallery img {
	width: 100%;
	height: auto;
	max-height: 500px;
	object-fit: cover;
	display: block;
}

/* Gallery navigation arrows */
.hostaway-gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	color: #2a2a2a;
	cursor: pointer;
	z-index: 10;
	transition: background 0.2s, color 0.2s, box-shadow 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hostaway-gallery-arrow:hover {
	background: #fff;
	color: #2eb0d1;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hostaway-gallery-arrow {
	font-size: 32px;
	line-height: 1;
	font-weight: 300;
}

.hostaway-gallery-prev {
	left: 8px;
}

.hostaway-gallery-next {
	right: 8px;
}

.hostaway-gallery-arrow.slick-disabled {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
}

.haway-single-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	margin-top: 30px;
}

.haway-single-left {
	flex: 1 1 0;
	min-width: 0;
}

.haway-single-right {
	flex: 0 0 360px;
}

.haway-single-card {
	background: #fff;
	padding: 25px;
	border: 1px solid #e0e0e0;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
	border-radius: 12px;
	overflow: hidden;
}

.listing-title {
	margin: 0 0 20px;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.3;
	color: #2a2a2a;
}

.haway-meta-items {
	margin: 0 0 20px;
	color: #5a5a5a;
	font-size: 15px;
	line-height: 1.5;
}

.stay-note {
	color: #2a2a2a;
	font-size: 15px;
	margin: 0 0 28px;
	line-height: 1.6;
	padding: 14px 18px;
	background: #f0f8fa;
	border-left: 4px solid #2eb0d1;
	border-radius: 4px;
}

.listing-description {
	margin-bottom: 28px;
}

.listing-description-content {
	font-size: 15px;
	line-height: 1.7;
	color: #2a2a2a;
}

.listing-description-content p {
	margin: 0 0 1em;
}

.listing-description-content p:last-child {
	margin-bottom: 0;
}

.listing-description-content h1,
.listing-description-content h2,
.listing-description-content h3,
.listing-description-content h4,
.listing-description-content h5,
.listing-description-content h6 {
	margin: 1.25em 0 0.5em;
	padding: 8px 12px;
	background: #f0f8fa;
	border-left: 4px solid #2eb0d1;
	border-radius: 4px;
	font-weight: 600;
	color: #2a2a2a;
}

.listing-description-content h1:first-child,
.listing-description-content h2:first-child,
.listing-description-content h3:first-child,
.listing-description-content h4:first-child,
.listing-description-content h5:first-child,
.listing-description-content h6:first-child {
	margin-top: 0;
}

.listing-description-content h1 { font-size: 1.5em; }
.listing-description-content h2 { font-size: 1.35em; }
.listing-description-content h3 { font-size: 1.2em; }
.listing-description-content h4 { font-size: 1.1em; }
.listing-description-content h5 { font-size: 1.05em; }
.listing-description-content h6 { font-size: 1em; }

.listing-description-content.hostaway-desc-collapsed {
	max-height: 150px;
	overflow: hidden;
	position: relative;
}

.listing-description-content.hostaway-desc-collapsed::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 50px;
	background: linear-gradient(transparent, #fff);
}

.hostaway-toggle-btn {
	background: none;
	border: none;
	color: #2eb0d1;
	cursor: pointer;
	font-size: 14px;
	padding: 8px 0;
	margin-top: 12px;
	font-weight: 500;
}

.hostaway-toggle-btn:hover {
	text-decoration: underline;
}

.reservation-info-outer h3,
.amenities-outer h3,
.listing-calendar h3 {
	font-size: 20px;
	font-weight: 600;
	color: #2a2a2a;
	margin: 32px 0 16px;
	padding-bottom: 8px;
	border-bottom: 1px solid #eee;
}

.reservation-info-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.reservation-info-items h4 {
	font-size: 15px;
	font-weight: 400;
	color: #5a5a5a;
	margin: 0;
	line-height: 1.5;
}

.reservation-info-items h4 span {
	font-weight: 600;
	color: #2a2a2a;
	margin-left: 4px;
}

.cancellation-policy-outer {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.cancellation-policy-outer h5 {
	font-size: 17px;
	font-weight: 600;
	margin: 0 0 12px;
	color: #2a2a2a;
}

.cancellation-policy-content,
.cancellation-policy-outer p {
	font-size: 14px;
	line-height: 1.6;
	color: #5a5a5a;
	margin: 0 0 0.75em;
}

.cancellation-policy-content p:last-child,
.cancellation-policy-outer p:last-child {
	margin-bottom: 0;
}

.listing-amenities {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	padding: 0;
	margin: 0 0 16px;
	list-style: none;
}

.listing-amenities-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 16px 24px;
	margin: 0 0 16px;
}

.listing-amenities li {
	font-size: 14px;
	color: #5a5a5a;
	line-height: 1.5;
	padding-left: 0;
}

.listing-amenities-grid .listing-amenity-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: #5a5a5a;
}

.listing-amenities-grid .listing-amenity-icon {
	font-size: 20px;
	width: 24px;
	height: 24px;
	color: #2eb0d1;
	flex-shrink: 0;
}

.listing-amenities-grid .listing-amenity-label {
	line-height: 1.4;
}

@media (max-width: 1024px) {
	.listing-amenities-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.listing-amenities-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px 16px;
	}
}

.listing-amenities li.hidden {
	display: none;
}

/* Calendar – haway-cal structure */
.hostaway-calendar,
#haway-calendar {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	margin-top: 20px;
}

.haway-cal-month-block {
	display: none;
}

.haway-cal-month-block.haway-cal-month-active {
	display: flex;
	flex-direction: column;
}

.haway-cal-month-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
	font-size: 18px;
	margin-bottom: 15px;
	padding: 15px 5px;
	color: #2a2a2a;
}

.haway-cal-week-names {
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	margin-bottom: 5px;
}

.haway-cal-week-name {
	text-align: center;
	flex: 1;
	padding: 7px 2px;
	font-size: 12px;
	text-transform: uppercase;
	color: #666;
}

.haway-cal-dates-block {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
}

.haway-cal-cell {
	flex: 0 0 calc(14.28% - 2px);
	box-sizing: border-box;
	text-align: center;
	padding: 8px 4px;
	min-height: 50px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: #666;
	border-radius: 4px;
}

.haway-cal-cell-active {
	cursor: pointer;
	background: #e8f5e9;
}

.haway-cal-cell-active:hover {
	background: #c8e6c9;
}

.haway-cal-cell-disabled {
	background: #f5f5f5;
	opacity: 0.7;
}

.haway-cal-cell-empty {
	background: transparent;
}

.haway-cal-cell-price {
	font-size: 12px;
	color: #2eb0d1;
	font-weight: 500;
}

.haway-single-right .hostaway-booking-form {
	position: sticky;
	top: 100px;
}

/* Responsive – single listing */
@media (max-width: 991px) {
	.haway-single-left,
	.haway-single-right {
		flex: 1 1 100%;
	}
	.haway-single-right .hostaway-booking-form {
		position: static;
	}
}

@media (max-width: 767px) {
	.haway-gallery-wrapper {
		padding: 0 40px;
	}
	.hostaway-gallery-arrow {
		width: 40px;
		height: 40px;
	}
	.hostaway-gallery-arrow .dashicons {
		font-size: 20px;
		width: 20px;
		height: 20px;
	}
	.hostaway-gallery-prev { left: 4px; }
	.hostaway-gallery-next { right: 4px; }
	.haway-single-wrapper {
		padding: 0 15px;
	}
	.haway-single-card {
		padding: 20px;
	}
}

/* Booking form – Sailing theme sidebar */
.haway-single-right .hostaway-booking-form,
.hostaway-booking-form {
	background: #fff;
	padding: 1.5rem;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.hostaway-booking-submit {
	background: #2eb0d1 !important;
}

.hostaway-booking-submit:hover {
	background: #258da7 !important;
}

.hostaway-booking-form h3 {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
}

.hostaway-booking-fields {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hostaway-booking-field label {
	display: block;
	font-size: 1.15rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	color: #2a2a2a;
}

.hostaway-booking-field input,
.hostaway-booking-field select {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95rem;
	box-sizing: border-box;
}

.hostaway-booking-submit {
	width: 100%;
	margin-top: 1rem;
	padding: 0.75rem 1.5rem;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.hostaway-booking-submit:hover {
	background: #005a87;
}

.hostaway-booking-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

#hostaway-reservation-response {
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

#hostaway-reservation-response.success {
	color: #2e7d32;
}

#hostaway-reservation-response.error {
	color: #c62828;
}

#hostaway-price-breakdown {
	margin: 1rem 0;
	padding: 1rem 0;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
	font-size: 0.95rem;
}

#hostaway-price-breakdown .hostaway-price-total {
	font-weight: 700;
	font-size: 1.1rem;
	margin-top: 0.5rem;
	color: #2a2a2a;
}
