/**
 * Elementor Gallery Frontend & Editor CSS
 * Google Drive Media Manager
 */

@import url('gdmm-library.css');

/* Elementor Image Gallery Frontend */
.elementor-image-gallery .gallery-item img {
	transition: transform 0.3s ease, filter 0.3s ease;
}

.elementor-image-gallery .gallery-item img:hover {
	transform: scale(1.02);
}

.gdmm-elementor-action-box {
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.gdmm-elementor-action-box .elementor-button:hover {
	background: #1557b0 !important;
}

/* Ensure Google Drive tab inside Elementor's wp.media modal is full height and styled */
.media-modal .gdmm-media-frame-content {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	background: #fff;
	overflow: hidden;
	z-index: 50;
}

.media-modal .gdmm-frame-toolbar {
	padding: 10px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: #fff;
	border-bottom: 1px solid #dcdcde;
	flex-shrink: 0;
}

.media-modal .gdmm-frame-body {
	flex: 1;
	display: flex;
	position: relative;
	overflow: hidden;
	min-height: 0;
}

.media-modal .gdmm-frame-grid-wrap {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
	margin-right: 300px;
	box-sizing: border-box;
	min-height: 0;
}

.media-modal .gdmm-frame-sidebar {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 300px;
	background: #f6f7f7;
	border-left: 1px solid #dcdcde;
	overflow-y: auto;
	padding: 18px;
	box-sizing: border-box;
	z-index: 10;
}

/* Pills styling inside Elementor */
.gdmm-folder-filter-pills {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #f0f0f1;
	padding: 3px 5px;
	border-radius: 20px;
	border: 1px solid #dcdcde;
}

.gdmm-folder-filter-pills .gdmm-pill {
	border: none;
	background: transparent;
	color: #50575e;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 14px;
	cursor: pointer;
	transition: all 0.15s ease;
	outline: none;
}

.gdmm-folder-filter-pills .gdmm-pill:hover {
	color: #1a73e8;
	background: rgba(26,115,232,0.08);
}

.gdmm-folder-filter-pills .gdmm-pill.active {
	background: #1a73e8 !important;
	color: #fff !important;
	box-shadow: 0 1px 3px rgba(26,115,232,0.3);
}

/* ==========================================================================
   Frontend Gallery Lightbox (Matches Elementor / VBIT Event Lightbox reference)
   ========================================================================== */
body.gdmm-lb-open {
	overflow: hidden !important;
}

.gdmm-lb-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.90);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	z-index: 999999;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-sizing: border-box;
	user-select: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.gdmm-lb-top-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 24px;
	color: #fff;
	z-index: 10;
}

.gdmm-lb-counter {
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.5px;
	color: rgba(255, 255, 255, 0.9);
}

.gdmm-lb-controls {
	display: flex;
	align-items: center;
	gap: 12px;
}

.gdmm-lb-btn {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.85);
	cursor: pointer;
	padding: 6px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	outline: none;
}

.gdmm-lb-btn:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.15);
	transform: scale(1.08);
}

.gdmm-lb-stage {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	position: relative;
	overflow: hidden;
	min-height: 0;
}

.gdmm-lb-arrow {
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #fff;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	z-index: 10;
	outline: none;
	flex-shrink: 0;
}

.gdmm-lb-arrow:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: scale(1.1);
}

.gdmm-lb-img-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	height: 100%;
	padding: 10px;
	box-sizing: border-box;
}

.gdmm-lb-image {
	max-width: 88vw;
	max-height: 78vh;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
	transition: transform 0.25s ease, opacity 0.25s ease;
	cursor: default;
}

.gdmm-lb-image.zoomed {
	max-width: none;
	max-height: none;
	transform: scale(1.6);
	cursor: zoom-out;
}

.gdmm-lb-spinner {
	width: 44px;
	height: 44px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #fff;
	border-radius: 50%;
	animation: gdmm-lb-spin 0.8s linear infinite;
	position: absolute;
}

@keyframes gdmm-lb-spin {
	to { transform: rotate(360deg); }
}

.gdmm-lb-bottom-bar {
	padding: 14px 24px;
	text-align: center;
	color: rgba(255, 255, 255, 0.95);
	font-size: 15px;
	font-weight: 500;
	z-index: 10;
	min-height: 24px;
}

.gdmm-lb-caption-text {
	display: inline-block;
	max-width: 80%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
