/**
 * Comitech Popups - Frontend styles
 */

/* --- Βασικό (κρυφό μέχρι να ενεργοποιηθεί) --- */
.cmt-popup {
	display: none;
	box-sizing: border-box;
}
.cmt-popup *,
.cmt-popup *::before,
.cmt-popup *::after {
	box-sizing: border-box;
}
.cmt-popup.cmt-visible {
	display: block;
}

/* --- Overlay (modal & fullscreen) --- */
.cmt-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 99998;
}
.cmt-popup.cmt-open .cmt-popup-overlay {
	opacity: 1;
}

/* --- Κουτί --- */
.cmt-popup-box {
	position: relative;
	background: #fff;
	color: #1a1a1a;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	z-index: 99999;
	max-width: 600px;
	width: 100%;
	overflow: hidden;
}

/* --- Κουμπί κλεισίματος --- */
.cmt-popup-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 34px;
	height: 34px;
	line-height: 30px;
	text-align: center;
	font-size: 26px;
	color: #fff;
	background: rgba(0, 0, 0, 0.55);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	z-index: 2;
	padding: 0;
	transition: background 0.2s ease, transform 0.2s ease;
}
.cmt-popup-close:hover {
	background: rgba(0, 0, 0, 0.85);
	transform: scale(1.05);
}

/* --- Περιεχόμενο --- */
.cmt-popup-content {
	display: block;
}
.cmt-popup-image,
.cmt-popup-image-link img {
	display: block;
	width: 100%;
	height: auto;
}
.cmt-popup-title {
	margin: 0;
	padding: 18px 22px 0;
	font-size: 20px;
	line-height: 1.3;
}
.cmt-popup-html {
	padding: 22px;
}
.cmt-popup-html > *:first-child {
	margin-top: 0;
}
.cmt-popup-html > *:last-child {
	margin-bottom: 0;
}

/* --- Responsive βίντεο (16:9) --- */
.cmt-popup-video {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	background: #000;
}
.cmt-popup-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* --- CTA --- */
.cmt-popup-cta-wrap {
	padding: 18px 22px 22px;
	text-align: center;
}
.cmt-popup-cta {
	display: inline-block;
	padding: 12px 26px;
	background: #2563eb;
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
	transition: background 0.2s ease;
}
.cmt-popup-cta:hover {
	background: #1d4ed8;
	color: #fff;
}

/* ===================================================
   ΣΤΥΛ 1: MODAL (κέντρο, σκάει μπροστά)
   =================================================== */
.cmt-style-modal {
	position: fixed;
	inset: 0;
	z-index: 99998;
	padding: 20px;
	overflow-y: auto;
}
.cmt-style-modal.cmt-visible {
	display: flex;
	align-items: center;
	justify-content: center;
}
.cmt-style-modal .cmt-popup-box {
	transform: scale(0.85);
	opacity: 0;
	transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s ease;
}
.cmt-style-modal.cmt-open .cmt-popup-box {
	transform: scale(1);
	opacity: 1;
}

/* ===================================================
   ΣΤΥΛ 2: FULLSCREEN
   =================================================== */
.cmt-style-fullscreen {
	position: fixed;
	inset: 0;
	z-index: 99998;
}
.cmt-style-fullscreen.cmt-visible {
	display: flex;
	align-items: center;
	justify-content: center;
}
.cmt-style-fullscreen .cmt-popup-overlay {
	background: rgba(0, 0, 0, 0.92);
}
.cmt-style-fullscreen .cmt-popup-box {
	max-width: 90vw;
	max-height: 90vh;
	overflow-y: auto;
	background: transparent;
	box-shadow: none;
	opacity: 0;
	transition: opacity 0.35s ease;
}
.cmt-style-fullscreen.cmt-open .cmt-popup-box {
	opacity: 1;
}
.cmt-style-fullscreen .cmt-popup-video {
	width: 90vw;
	max-width: 1280px;
	padding-top: 50.625vw;
	max-height: 90vh;
}

/* ===================================================
   ΣΤΥΛ 3: SLIDE-IN (γωνία)
   =================================================== */
.cmt-style-slide {
	position: fixed;
	z-index: 99999;
	max-width: 380px;
	width: calc(100% - 40px);
}
.cmt-style-slide .cmt-popup-box {
	transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
	opacity: 0;
}
.cmt-style-slide.cmt-open .cmt-popup-box {
	transform: translate(0, 0) !important;
	opacity: 1;
}
/* Θέσεις */
.cmt-slide-bottom-right { bottom: 20px; right: 20px; }
.cmt-slide-bottom-left  { bottom: 20px; left: 20px; }
.cmt-slide-top-right    { top: 20px; right: 20px; }
.cmt-slide-top-left     { top: 20px; left: 20px; }

.cmt-slide-bottom-right .cmt-popup-box,
.cmt-slide-top-right .cmt-popup-box { transform: translateX(120%); }
.cmt-slide-bottom-left .cmt-popup-box,
.cmt-slide-top-left .cmt-popup-box { transform: translateX(-120%); }

/* ===================================================
   ΣΤΥΛ 4: BAR (πάνω / κάτω)
   =================================================== */
.cmt-style-bar {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 99999;
	width: 100%;
}
.cmt-bar-top { top: 0; }
.cmt-bar-bottom { bottom: 0; }
.cmt-style-bar .cmt-popup-box {
	max-width: 100%;
	width: 100%;
	border-radius: 0;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
	transition: transform 0.4s ease;
}
.cmt-bar-top .cmt-popup-box { transform: translateY(-100%); }
.cmt-bar-bottom .cmt-popup-box { transform: translateY(100%); }
.cmt-style-bar.cmt-open .cmt-popup-box {
	transform: translateY(0);
}
.cmt-style-bar .cmt-popup-content {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	flex-wrap: wrap;
	padding: 14px 60px 14px 20px;
}
.cmt-style-bar .cmt-popup-title,
.cmt-style-bar .cmt-popup-html {
	padding: 0;
}
.cmt-style-bar .cmt-popup-cta-wrap {
	padding: 0;
}
.cmt-style-bar .cmt-popup-image,
.cmt-style-bar .cmt-popup-image-link img {
	max-height: 60px;
	width: auto;
}
.cmt-style-bar .cmt-popup-close {
	background: rgba(0, 0, 0, 0.25);
	color: inherit;
}

/* ===================================================
   Mobile
   =================================================== */
@media (max-width: 600px) {
	.cmt-style-slide {
		max-width: none;
		width: calc(100% - 24px);
		left: 12px !important;
		right: 12px !important;
	}
	.cmt-style-slide.cmt-slide-bottom-left,
	.cmt-style-slide.cmt-slide-bottom-right { bottom: 12px; }
	.cmt-style-slide.cmt-slide-top-left,
	.cmt-style-slide.cmt-slide-top-right { top: 12px; }
	.cmt-popup-title { font-size: 18px; }
}

/* ===================================================
   LAUNCHER (minimized εικονίδιο)
   =================================================== */
.cmt-launcher {
	position: fixed;
	z-index: 99997;
	display: none;               /* κρυφό μέχρι να γίνει minimize */
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	border-radius: 50%;
	overflow: hidden;
	cursor: pointer;
	background: linear-gradient(135deg, #6d28d9, #2563eb);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
	transform: scale(0);
	transition: transform 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}
.cmt-launcher.cmt-visible {
	display: flex;
}
.cmt-launcher.cmt-open {
	transform: scale(1);
}
.cmt-launcher:hover {
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
}
.cmt-launcher svg {
	width: 52%;
	height: 52%;
}
.cmt-launcher img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	display: block;
}
/* Θέσεις launcher */
.cmt-launcher-bottom-right { bottom: 20px; right: 20px; }
.cmt-launcher-bottom-left  { bottom: 20px; left: 20px; }
.cmt-launcher-top-right    { top: 20px; right: 20px; }
.cmt-launcher-top-left     { top: 20px; left: 20px; }

@media (max-width: 600px) {
	.cmt-launcher-bottom-right, .cmt-launcher-bottom-left { bottom: 14px; }
	.cmt-launcher-top-right, .cmt-launcher-top-left { top: 14px; }
	.cmt-launcher-bottom-right, .cmt-launcher-top-right { right: 14px; }
	.cmt-launcher-bottom-left, .cmt-launcher-top-left { left: 14px; }
}

/* Σεβασμός prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.cmt-popup-overlay,
	.cmt-popup-box,
	.cmt-popup-close,
	.cmt-launcher {
		transition: none !important;
	}
}
