/**
 * Location Gallery Styles - Swiper Implementation
 * 
 * Replaces legacy mediaGallery.js CSS with modern Swiper 11 styling.
 * Dark theme with fullscreen gallery, thumbnails, and controls.
 * 
 * @package Velocity_Golden_Oak_V2
 * @since 2.0.0
 */

/* ========================================
   Page Layout - Location Pages
   ======================================== */

#location-page-wrapper {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #111;
	overflow: hidden;
}

.velocity-location-page {
	color: #fff;
	font-family: 'Oswald', 'Terminal Dosis', sans-serif;
}

/* ========================================
   Location Header (Logo top right)
   ======================================== */

.location-header {
	position: absolute;
	top: 10px;
	right: 25px; /* Aligned with thumbnails column (10px right + 15px padding) */
	width: 217px; /* 247px - 30px padding */
	z-index: 100;
	background: transparent;
	text-align: center;
	box-sizing: border-box;
}

.location-header .branding {
	padding: 0;
	box-sizing: border-box;
}

.location-header .header_logo img {
	max-width: 100%;
	height: auto;
}

/* ========================================
   Location Info Header (House Header) - Matching original theme
   ======================================== */

.location-info-header {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1000;
	display: flex;
	align-items: stretch;
}

/* Location name section - left side */
.location-category {
	height: 100px;
	background: url('../../images/title_box_bg.png') repeat;
	line-height: 100px;
	padding: 0 40px;
	float: left;
}

.location-category a {
	font-weight: normal;
	color: #fff;
	font-family: 'Gentium Book Basic', serif;
	font-size: 48px;
	text-decoration: none;
}

.location-category a:hover {
	color: #D7D2CB;
}

/* House name section - right side */
.location-title-block {
	position: relative;
	height: 100px;
	float: left;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	line-height: 18px;
	background: url('../../images/title_box_bg.png') repeat;
	margin-left: 2px;
	padding: 0 60px 0 30px;
	position: relative;
	box-sizing: border-box;
}

.location-title {
	display: block;
	font-size: 16px;
	color: #fff;
	font-family: 'Oswald', sans-serif;
	margin: 0;
	font-weight: normal;
}

.location-house-name {
	display: block;
	font-size: 16px;
	font-weight: normal;
	color: #fff;
	font-family: 'Oswald', sans-serif;
}

.location-image-counter {
	display: block;
	font-size: 13px;
	color: #fff;
	font-family: 'Oswald', sans-serif;
	margin-top: 2px;
}

/* ========================================
   Main Gallery Container
   ======================================== */

.velocity-location-gallery {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #111;
}

/* ========================================
   Main Swiper Gallery
   ======================================== */

.location-gallery-main {
	width: 100%;
	height: 100%;
	z-index: 1; /* Below thumbnails column */
}

.location-gallery-main .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #111;
}

/* Image slides */
.slide-image-wrapper {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.slide-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Video slides */
.slide-video-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.slide-video {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	background: #000;
}

.video-play-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.3);
	cursor: pointer;
}

.video-play-btn {
	width: 80px;
	height: 80px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	cursor: pointer;
	transition: transform 0.2s, background 0.2s;
}

.video-play-btn:hover {
	transform: scale(1.1);
	background: #fff;
}

.video-play-btn .play-icon {
	font-size: 32px;
	color: #111;
	margin-left: 5px;
}

/* Navigation arrows - Using legacy theme icons (46x215 as in original) */
/* Override Swiper default styles with high specificity */
.velocity-location-gallery .swiper-button-prev.location-nav-prev,
.velocity-location-gallery .swiper-button-next.location-nav-next,
.location-nav-prev,
.location-nav-next {
	position: absolute !important;
	top: 50% !important;
	width: 46px !important;
	height: 215px !important;
	margin-top: -107px !important; /* Half of 215px to center vertically */
	background-color: transparent !important;
	background-repeat: no-repeat !important;
	background-position: center center !important;
	background-size: 46px 215px !important;
	border: none !important;
	z-index: 15 !important;
	cursor: pointer !important;
	color: transparent !important;
}

/* Hide Swiper default arrow icons */
.velocity-location-gallery .swiper-button-prev.location-nav-prev::after,
.velocity-location-gallery .swiper-button-next.location-nav-next::after,
.location-nav-prev::after,
.location-nav-next::after {
	display: none !important;
	content: none !important;
}

/* Previous arrow */
.velocity-location-gallery .swiper-button-prev.location-nav-prev,
.location-nav-prev {
	left: 15px !important;
	right: auto !important;
	background-image: url('../../images/icons/prev_off.png') !important;
}

.velocity-location-gallery .swiper-button-prev.location-nav-prev:hover,
.location-nav-prev:hover {
	background-image: url('../../images/icons/prev_on.png') !important;
}

/* Next arrow - positioned BEFORE the thumbnails column */
.velocity-location-gallery .swiper-button-next.location-nav-next,
.location-nav-next {
	right: 297px !important; /* 247px thumbnails width + 10px right + 10px padding + 30px gap */
	left: auto !important;
	background-image: url('../../images/icons/next_off.png') !important;
}

.velocity-location-gallery .swiper-button-next.location-nav-next:hover,
.location-nav-next:hover {
	background-image: url('../../images/icons/next_on.png') !important;
}

/* ========================================
   Thumbnail Gallery (Right side, vertical)
   ======================================== */

.location-gallery-thumbs-wrapper {
	position: absolute;
	top: 150px; /* Below header/logo area */
	right: 35px;
	bottom: 85px;
	width: 247px;
	z-index: 20;
	background: url('../../images/title_box_bg.png') repeat;
	padding: 15px;
	display: flex;
	flex-direction: column;
	align-items: center;
	box-sizing: border-box;
}

/* Logo in thumbnails column - hidden (logo is in header) */
.thumbs-logo {
	display: none;
}

.location-gallery-thumbs {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.location-gallery-thumbs .swiper-wrapper {
	flex-direction: column;
	align-items: center;
}

.location-gallery-thumbs .swiper-slide {
	width: 207px !important;
	height: 100px;
	opacity: 1;
	cursor: pointer;
	transition: transform 0.3s;
	border: 4px solid transparent;
	overflow: hidden;
	flex-shrink: 0;
	margin: 0 auto 10px auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* .location-gallery-thumbs .swiper-slide:hover - All thumbnails at 100% opacity always */

.location-gallery-thumbs .swiper-slide-thumb-active {
	border-color: rgb(204, 204, 204);
}

/* skip-thumb is now handled in PHP by not rendering the element */

.thumb-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.thumb-video-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 20px;
	color: #fff;
	text-shadow: 0 0 5px rgba(0,0,0,0.8);
	pointer-events: none;
}

/* Thumbnail navigation buttons (vertical, top and bottom) */
.thumb-nav-btn {
	position: absolute;
	right: 2px;
	width: auto;
	height: auto;
	background: transparent;
	border: none;
	cursor: pointer;
	z-index: 30;
	opacity: 0.8;
	transition: opacity 0.3s;
	display: none; /* Hidden by default, shown by JS when needed */
	padding: 0;
}

.thumb-nav-btn:hover {
	opacity: 1;
}

.thumb-nav-btn.disabled {
	opacity: 0.5;
	cursor: default;
}

.thumb-nav-btn img {
	display: block;
}

.thumb-nav-prev {
	top: 5px;
}

.thumb-nav-next {
	bottom: 10px;
}

/* Hide thumb navigation when thumbnails column is collapsed */
.location-gallery-thumbs-wrapper.collapsed .thumb-nav-btn {
	display: none !important;
}

/* Playlist toggle button - hidden (old button) */
.playlist-toggle-btn {
	display: none;
}

/* Thumbnails Toggle Button (Collapse/Expand) */
.thumbs-toggle-btn {
	position: absolute;
	top: -38px;
	left: 50%;
	transform: translateX(-50%);
	width: 247px;
	height: 38px;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	z-index: 25;
}

.thumbs-toggle-btn .toggle-img {
	display: block;
	width: 247px;
	height: 38px;
}

/* Hover effect - swap images */
.thumbs-toggle-btn:hover .toggle-collapse {
	content: url('../../images/icons/minus_on.png');
}

.thumbs-toggle-btn:hover .toggle-expand {
	content: url('../../images/icons/plus_on.png');
}

/* Collapsed state */
.location-gallery-thumbs-wrapper.collapsed {
	overflow: hidden;
	width: 247px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent !important;
}

.location-gallery-thumbs-wrapper.collapsed .thumbs-logo,
.location-gallery-thumbs-wrapper.collapsed .location-gallery-thumbs,
.location-gallery-thumbs-wrapper.collapsed .thumb-nav-btn {
	display: none !important;
}

.location-gallery-thumbs-wrapper.collapsed .thumbs-toggle-btn {
	position: relative;
	top: 0;
	left: 0;
	transform: none;
}

/* ========================================
   Slideshow Controls (Hidden by default - matches original design)
   ======================================== */

.location-gallery-controls {
	display: none; /* Hidden - original design doesn't have central controls */
}

.gallery-control-btn {
	display: none;
}

/* ========================================
   Info Panel
   ======================================== */

.location-gallery-info {
	position: absolute;
	top: 180px;
	right: 30px;
	max-width: 350px;
	background: rgba(0, 0, 0, 0.7);
	border-radius: 20px;
	padding: 20px 25px;
	z-index: 40;
	color: #e5e5e5;
	font-family: 'Terminal Dosis', 'Gentium Book Basic', sans-serif;
}

.info-close-btn {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.3s;
}

.info-close-btn:hover {
	opacity: 1;
}

.info-content {
	padding-right: 20px;
}

.info-title {
	margin: 0 0 10px 0;
	font-size: 18px;
	font-weight: bold;
	color: #fff;
}

.info-description {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.info-description a {
	color: #e5e5e5;
	text-decoration: underline;
}

/* ========================================
   Info Holder (Image info panel - matches legacy theme)
   ======================================== */

.info_holder {
	position: absolute;
	top: 140px; /* Below location-info-header (100px) + 40px margin */
	left: 50%;
	transform: translateX(-50%);
	z-index: 102;
	background: url('../../images/house_box_bg.png') repeat;
	color: #fff;
	padding: 15px 40px 15px 20px;
	font-size: 14px;
	line-height: 20px;
	min-width: 350px;
	max-width: 600px;
}

.info_holder .info-holder-close {
	position: absolute;
	right: 15px;
	top: 5px;
	font-size: 16px;
	font-weight: bold;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
}

.info_holder .info-holder-close:hover {
	color: #ccc;
}

.info_holder .location_img_name {
	display: block;
	font-weight: bold;
	margin-bottom: 5px;
}

.info_holder .location_img_description {
	display: block;
}

.info_holder a {
	color: #e5e5e5;
	text-decoration: underline;
}

/* Info toggle button - bottom right corner of location-title-block */
.info-toggle-btn {
	position: absolute;
	bottom: 5px;
	right: 5px;
	width: 20px;
	height: 20px;
	border: none;
	border-radius: 0;
	background: transparent;
	color: #fff;
	font-size: 14px;
	font-style: italic;
	font-family: 'Georgia', serif;
	cursor: pointer;
	z-index: 30;
	opacity: 0.7;
	transition: opacity 0.3s;
}

.info-toggle-btn:hover {
	opacity: 1;
}

/* ========================================
   Image Counter (Hidden - counter is in header now)
   ======================================== */

.location-gallery-counter {
	display: none;
}

/* ========================================
   Download Link - with background image like legacy theme
   ======================================== */

.location-gallery-download {
	position: absolute;
	bottom: 85px;
	right: 320px; /* Before thumbnails column */
	width: 114px;
	height: 20px;
	display: block;
	background: url('../../images/icons/btn_download_off.png') no-repeat center center;
	text-indent: -9999px; /* Hide text, show only background image */
	z-index: 100;
	transition: background 0.2s;
}

.location-gallery-download:hover {
	background: url('../../images/icons/btn_download_on.png') no-repeat center center;
}

/* ========================================
   No Gallery Fallback
   ======================================== */

.location-no-gallery {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	max-width: 800px;
	padding: 40px;
}

.location-featured-image {
	margin-bottom: 20px;
}

.location-main-img {
	max-width: 100%;
	height: auto;
}

.location-content {
	color: #ccc;
	font-size: 16px;
	line-height: 1.6;
}

.no-gallery-notice {
	color: #999;
	font-size: 14px;
	margin-top: 20px;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 1024px) {
	.location-title {
		font-size: 24px;
	}
	
	.location-nav-next {
		right: 230px; /* Adjusted for smaller thumbnails + 30px gap */
	}
	
	.location-gallery-info {
		max-width: 300px;
		top: 160px;
		right: 200px;
	}
}

@media (max-width: 768px) {
	.location-info-header {
		flex-direction: column;
	}
	
	.location-category {
		height: 70px;
		line-height: 70px;
		padding: 0 10px;
	}
	
	.location-category a {
		font-size: 18px;
	}
	
	.location-title-block {
		height: auto;
		padding: 8px 40px 8px 10px;
	}
	
	.location-title,
	.location-house-name {
		font-size: 14px;
	}
	
	.location-image-counter {
		font-size: 11px;
	}
	
	/* Hide thumbnails on mobile - show only main gallery */
	.location-gallery-thumbs-wrapper {
		display: none;
	}
	
	.location-header {
		display: none;
	}
	
	.location-gallery-info {
		top: auto;
		bottom: 80px;
		left: 15px;
		right: 15px;
		max-width: none;
	}
	
	.info-toggle-btn {
		bottom: 30px;
		right: 15px;
	}
	
	/* Navigation arrows - smaller on mobile but maintain aspect ratio */
	.location-nav-prev,
	.location-nav-next {
		width: 30px !important;
		height: 140px !important;
		margin-top: -70px !important;
		background-size: 30px 140px !important;
	}
	
	.location-nav-next {
		right: 10px !important; /* Thumbnails hidden, so next arrow goes to edge */
	}
}

@media (max-width: 480px) {
	.location-title-block {
		flex-direction: column;
		gap: 5px;
	}
	
	.location-title {
		font-size: 18px;
	}
	
	.gallery-control-btn {
		width: 35px;
		height: 35px;
		font-size: 14px;
	}
	
	.video-play-btn {
		width: 60px;
		height: 60px;
	}
	
	.video-play-btn .play-icon {
		font-size: 24px;
	}
}
