/* ==========================================================================
   POPUPS — base styles
   ========================================================================== */

.popup {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: block;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	background: rgba(0, 0, 0, 0.5);

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.popup_active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.25s ease;
}

.popup-overlay {
	position: absolute;
	inset: 0;
  z-index: -1;
	background: transparent;
	cursor: pointer;
}


/* ==========================================================================
   Center popup
   ========================================================================== */

.popup {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.popup__wrap {
	position: relative;
	padding: 40px 32px 32px;
}

.popup__container {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 500px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	border-radius: 10px;
	background-color: #fff;
	overflow-y: auto;
}

@media (max-width: 767px) {
	.popup {
		padding: 12px;
	}

	.popup__wrap {
		padding: 36px 20px 24px;
	}

	.popup__container {
		max-width: 100%;
		max-height: calc(100vh - 24px);
		border-radius: 10px;
	}
}


/* ==========================================================================
   Side popup
   ========================================================================== */

.side-popup .side-popup__panel {
	position: absolute;
	top: 0;
	right: 0;
	left: auto;
	width: min(680px, 100vw);
	height: 100vh;
	height: 100dvh;
	margin: 0;
	background-color: #fff;
	transform: translateX(100%);
	transition: transform 0.5s ease;
	will-change: transform;
}

.side-popup.popup_active .side-popup__panel {
	transform: translateX(0);
}

.side-popup_left .side-popup__panel {
	right: auto;
	left: 0;
	transform: translateX(-100%);
}

.side-popup_left.popup_active .side-popup__panel {
	transform: translateX(0);
}


/* ==========================================================================
   Popup close button
   ========================================================================== */

.popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--text-color);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.popup__close:hover {
	opacity: 0.75;
}

@media (max-width: 767px) {
	.popup__close {
		top: 10px;
		right: 10px;
		width: 36px;
		height: 36px;
		font-size: 22px;
	}
}


/* ==========================================================================
   Popup form area
   ========================================================================== */

.popup__form .wpcf7-spinner {
	display: none;
}


/* ==========================================================================
   Preloader
   ========================================================================== */

.preloader {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.3);

	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.active {
	opacity: 1;
	visibility: visible;
}

.spinner {
	width: 60px;
	height: 60px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid var(--accent-color);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}


/* ==========================================================================
   Custom scroll
   ========================================================================== */

.custom-scroll::-webkit-scrollbar {
	width: 4px;
}

.custom-scroll::-webkit-scrollbar-track {
	background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
	background-color: rgba(100, 100, 100, 0.3);
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.custom-scroll:hover::-webkit-scrollbar-thumb {
	background-color: rgba(100, 100, 100, 0.7);
}

.custom-scroll::-webkit-scrollbar-button {
	display: none;
	width: 0;
	height: 0;
}

