/* =========================================================
   DevPress Factory Video Carousel Popup for Elementor
   Frontend Styles — v1.2.0
   ========================================================= */

/* =========================================================
   LAYOUT WRAPPER
   Supporta due modalità frecce:
   - .evc-nav-outside  → frecce fuori, ai lati, centrate verticalmente
   - .evc-nav-inside   → frecce sovrapposte alle slide (Swiper default)
   ========================================================= */

.evc-carousel-wrapper {
	position: relative;
	width: 100%;
}

/* --- Modalità OUTSIDE: griglia con colonne freccia | swiper | freccia --- */
/*
   Layout a 2 righe:
     riga 1: [freccia-prev] [swiper-slides] [freccia-next]
     riga 2: [     —      ] [paginazione  ] [     —      ]
   Le frecce restano ancorati alla sola riga 1 (l'area delle slide),
   ignorando il padding/paginazione sottostante.
*/
.evc-nav-outside {
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-rows: 1fr auto; /* riga1 = slides, riga2 = paginazione */
	column-gap: 12px;
}

/* Il popup occupa tutta la larghezza ignorando la griglia */
.evc-nav-outside .evc-popup-overlay {
	grid-column: 1 / -1;
}

/* Lo Swiper sta nella colonna centrale, occupa entrambe le righe */
.evc-nav-outside .evc-swiper {
	grid-column: 2;
	grid-row: 1 / 3;  /* copre riga slides + riga paginazione */
	min-width: 0;
}

/* Frecce: colonne laterali, solo riga 1 (altezza delle slide) → centrate */
.evc-nav-outside .evc-btn-prev {
	grid-column: 1;
	grid-row: 1;
	align-self: center;
}

.evc-nav-outside .evc-btn-next {
	grid-column: 3;
	grid-row: 1;
	align-self: center;
}

/* --- Modalità INSIDE: frecce sovrapposte alle slide (comportamento Swiper default) --- */
.evc-nav-inside {
	display: block;
}

.evc-nav-inside .evc-swiper {
	position: relative;
}

/* Nelle modalità inside le frecce sono posizionate in assoluto dentro il swiper */
.evc-nav-inside .evc-btn-prev,
.evc-nav-inside .evc-btn-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
}

.evc-nav-inside .evc-btn-prev { left: 10px; }
.evc-nav-inside .evc-btn-next { right: 10px; }

/* =========================================================
   FRECCE DI NAVIGAZIONE — base comune
   Gli stili specifici (size, color, border-radius ecc.)
   sono applicati inline via JS da applyNavStyles()
   ========================================================= */
.evc-nav-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	background: transparent;
	border: none;
	padding: 0;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

.evc-nav-btn:focus-visible {
	outline: 2px solid #4a90e2;
	outline-offset: 2px;
}

/* Stato disabilitato (Swiper aggiunge .swiper-button-disabled) */
.evc-nav-btn.swiper-button-disabled {
	opacity: 0.3;
	pointer-events: none;
}

.evc-nav-icon {
	display: block;
	flex-shrink: 0;
}

/* =========================================================
   SWIPER
   ========================================================= */
.evc-swiper {
	overflow: hidden;
	width: 100%;
}

/* La paginazione ha il suo spazio, non il padding dello swiper */
.evc-swiper .swiper-pagination {
	padding-top: 14px;
	position: relative;
	bottom: auto;
}

/* =========================================================
   CARD
   ========================================================= */
.evc-card {
	position: relative;
	cursor: pointer;
	overflow: hidden;
	background-color: #1a1a1a;
	border-radius: 12px;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	display: flex;
	flex-direction: column;
	user-select: none;
	-webkit-user-select: none;
}

.evc-card:hover {
	/* nessun effetto di sollevamento o ombra: mantenere altezza costante
	   per garantire il corretto allineamento verticale delle frecce di navigazione */
}

.evc-card:focus {
	outline: 2px solid #4a90e2;
	outline-offset: 2px;
}

/* =========================================================
   THUMBNAIL
   ========================================================= */
.evc-thumbnail-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: inherit;
}

.evc-thumbnail {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: inherit;
	transition: transform 0.35s ease;
}

.evc-thumbnail-placeholder {
	background-color: #333;
	background-image: linear-gradient(135deg, #444 25%, #333 25%, #333 50%, #444 50%, #444 75%, #333 75%);
	background-size: 40px 40px;
}

.evc-card:hover .evc-thumbnail {
	transform: scale(1.04);
}

/* =========================================================
   OVERLAY
   ========================================================= */
.evc-overlay {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background-color: rgba(0, 0, 0, 0.25);
	transition: background-color 0.25s ease;
	border-radius: inherit;
}

.evc-card:hover .evc-overlay {
	background-color: rgba(0, 0, 0, 0.15);
}

/* =========================================================
   PULSANTE PLAY
   ========================================================= */
.evc-play-btn {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%) scale(1);
	width: 64px; height: 64px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, background-color 0.2s ease;
	border: 2px solid rgba(255, 255, 255, 0.5);
	z-index: 2;
}

.evc-play-btn svg {
	width: 26px; height: 26px;
	margin-left: 3px;
}

.evc-play-btn svg path {
	fill: #ffffff;
}

.evc-card:hover .evc-play-btn {
	transform: translate(-50%, -50%) scale(1.1);
	background-color: rgba(255, 255, 255, 0.35);
}

/* =========================================================
   FOOTER CARD
   ========================================================= */
.evc-card-footer {
	padding: 10px 12px;
	background-color: inherit;
}

.evc-card-title {
	font-size: 14px;
	font-weight: 600;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.4;
}

/* =========================================================
   PAGINAZIONE SWIPER
   ========================================================= */
.evc-pagination .swiper-pagination-bullet {
	background-color: rgba(0, 0, 0, 0.4);
	opacity: 1;
	width: 8px; height: 8px;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.evc-pagination .swiper-pagination-bullet-active {
	background-color: #4a90e2;
	transform: scale(1.3);
}

/* =========================================================
   POPUP VIDEO
   ========================================================= */
.evc-popup-overlay {
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background-color: rgba(0, 0, 0, 0.85);
	z-index: 999999;
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.evc-popup-overlay.evc-popup-visible {
	opacity: 1;
}

.evc-popup-overlay[aria-hidden="true"] {
	display: none !important;
}

.evc-popup-inner {
	position: relative;
	width: 100%;
	max-width: 90vw;
	background-color: #000;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
	transform: scale(0.95);
	transition: transform 0.25s ease;
}

.evc-popup-overlay.evc-popup-visible .evc-popup-inner {
	transform: scale(1);
}

.evc-popup-close {
	position: absolute;
	top: 12px; right: 12px;
	width: 36px; height: 36px;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.6);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: background-color 0.2s ease, transform 0.2s ease;
	padding: 0;
	color: #fff;
}

.evc-popup-close:hover {
	background-color: rgba(220, 50, 50, 0.85);
	transform: scale(1.1);
}

.evc-popup-close svg {
	width: 18px; height: 18px;
	pointer-events: none;
}

.evc-popup-video-wrap {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	background-color: #000;
}

.evc-video-player {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	display: block;
	outline: none;
	background-color: #000;
}

.evc-popup-info {
	padding: 12px 16px 16px;
	background-color: #111;
}

.evc-popup-title {
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 4px;
}

.evc-popup-description {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.65);
	line-height: 1.5;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media screen and (max-width: 768px) {
	.evc-nav-outside {
		column-gap: 8px;
	}

	.evc-popup-inner {
		max-width: 100%;
		border-radius: 8px;
	}

	.evc-play-btn {
		width: 50px; height: 50px;
	}

	.evc-play-btn svg {
		width: 20px; height: 20px;
	}
}
