/* Wedoo Popup - frontend styles */

.wedoo-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .35s;
}

.wedoo-popup-overlay[hidden] {
	display: none;
}

.wedoo-popup-overlay.is-visible {
	opacity: 1;
	visibility: visible;
	transition: opacity .35s cubic-bezier(.4, 0, .2, 1), visibility 0s linear 0s;
}

.wedoo-popup-overlay::before {
	content: "";
	position: fixed;
	inset: 0;
	background-color: var(--wedoo-overlay-color, #000);
	opacity: var(--wedoo-overlay-opacity, .7);
	z-index: -1;
}

.wedoo-popup {
	position: relative;
	width: 100%;
	max-width: var(--wedoo-max-width, 720px);
	max-height: 90vh;
	overflow-y: auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	background-color: var(--wedoo-bg, #fff);
	background-image: var(--wedoo-bg-image, none);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-radius: var(--wedoo-radius, 16px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	transform: scale(.92) translateY(10px);
	opacity: 0;
	transition: transform .35s cubic-bezier(.4, 0, .2, 1), opacity .35s cubic-bezier(.4, 0, .2, 1);
}

.wedoo-popup::-webkit-scrollbar {      /* Chrome/Safari/Edge */
	display: none;
}

.wedoo-popup-overlay.is-visible .wedoo-popup {
	transform: scale(1) translateY(0);
	opacity: 1;
}

.wedoo-popup--img-right {
	grid-template-columns: 1fr 1fr;
}
.wedoo-popup--img-right .wedoo-popup__media {
	order: 2;
}
.wedoo-popup--img-right .wedoo-popup__content {
	order: 1;
}

.wedoo-popup__media {
	position: relative;
	min-height: var(--wedoo-image-height-desktop, 260px);
	overflow: hidden;
	box-sizing: border-box;
	padding: var(--wedoo-image-padding, 0px);
	/*background: var(--wedoo-bg, #fff);*/
	border-radius: var(--wedoo-radius, 16px) 0 0 var(--wedoo-radius, 16px);
}
.wedoo-popup--img-right .wedoo-popup__media {
	border-radius: 0 var(--wedoo-radius, 16px) var(--wedoo-radius, 16px) 0;
}

.wedoo-popup__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: var(--wedoo-image-radius, 0px);
}

.wedoo-popup__content {
	padding: 40px 36px;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	box-sizing: border-box;
}

/* Vertically centers itself in whatever space is left above the disclaimer,
   regardless of how much content is inside it. */
.wedoo-popup__main {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: auto;
	margin-bottom: auto;
}

.wedoo-popup__close {
	position: absolute;
	top: 14px;
	right: var(--wedoo-close-right, 14px); /* falls back to top-right even if the var is somehow missing */
	left: var(--wedoo-close-left, auto);
	z-index: 20;
	/*width: 32px;*/
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	border-radius: 50%;
	background: transparent;
	color: var(--wedoo-close-icon-color, #222);
	cursor: pointer;
	transition: filter .2s ease, transform .2s ease;
}
.wedoo-popup__close:hover {
	filter: brightness(1.05);
	transform: scale(1.05);
}
.wedoo-popup__close:focus,
.wedoo-popup__close:focus-visible {
	outline: none !important;
	box-shadow: none !important;
	filter: brightness(1.1);
}
.wedoo-popup__close-icon-img {
	width: 16px;
	height: 16px;
	object-fit: contain;
	display: block;
}

.wedoo-popup__heading {
	margin: 0;
	font-size: clamp(22px, 4vw, 32px);
	line-height: 1.15;
	font-weight: 800;
	color: var(--wedoo-heading-color, #0b2545);
}
.wedoo-popup__heading-2 {
	display: block;
}

.wedoo-popup__subheading {
	margin: 0;
	color: var(--wedoo-text-color, #333);
	font-size: 15px;
}

.wedoo-popup__shortcode {
	margin-top: 6px;
	text-align: var(--wedoo-shortcode-btn-align, center);
}

/* Generic, low-specificity styling so third-party shortcode forms
   (Contact Form 7, WPForms, Mailchimp for WP, etc.) inherit the popup look
   instead of rendering with their own default styles. Plugin-specific
   classes will still override these where needed. */
.wedoo-popup__shortcode input[type="text"],
.wedoo-popup__shortcode input[type="email"],
.wedoo-popup__shortcode input[type="tel"],
.wedoo-popup__shortcode input[type="number"],
.wedoo-popup__shortcode textarea,
.wedoo-popup__shortcode select {
	width: 100%;
	box-sizing: border-box;
	padding: 14px 16px;
	font-size: 15px;
	border: 1px solid #d5d9e0;
	border-radius: calc(var(--wedoo-radius, 16px) * .5);
	background: #f7f8fa;
	color: #222;
	margin-bottom: 12px;
	text-align: left;
}
.wedoo-popup__shortcode input:focus-visible,
.wedoo-popup__shortcode textarea:focus-visible,
.wedoo-popup__shortcode select:focus-visible {
	outline: 2px solid var(--wedoo-accent, #1c7ed6);
	outline-offset: 1px;
}

.wedoo-popup__shortcode button,
.wedoo-popup__shortcode input[type="submit"] {
	display: var(--wedoo-button-display, block);
	width: var(--wedoo-button-width, 100%);
	padding: var(--wedoo-button-padding, 14px 16px);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .02em;
	text-align: center;
	text-transform: var(--wedoo-button-text-transform, uppercase);
	border: 0;
	border-radius: var(--wedoo-button-radius, 8px);
	background: var(--wedoo-accent, #1c7ed6);
	color: var(--wedoo-btn-text, #fff);
	cursor: pointer;
	transition: filter .2s ease, background-color .2s ease, transform .1s ease;
}
.wedoo-popup__shortcode button:hover,
.wedoo-popup__shortcode input[type="submit"]:hover {
	background: var(--wedoo-button-hover-bg, var(--wedoo-accent, #1c7ed6));
	filter: var(--wedoo-button-hover-filter, brightness(1.08));
}
.wedoo-popup__shortcode button:active,
.wedoo-popup__shortcode input[type="submit"]:active {
	transform: scale(.99);
}

.wedoo-popup__cta {
	display: var(--wedoo-button-display, block);
	width: var(--wedoo-button-width, 100%);
	box-sizing: border-box;
	text-align: center;
	padding: var(--wedoo-button-padding, 14px 16px);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: var(--wedoo-button-text-transform, uppercase);
	text-decoration: none;
	border-radius: var(--wedoo-button-radius, 8px);
	background: var(--wedoo-accent, #1c7ed6);
	color: var(--wedoo-btn-text, #fff);
	cursor: pointer;
	transition: filter .2s ease, background-color .2s ease, transform .1s ease;
	margin-top: 6px;
	align-self: var(--wedoo-button-align-self, center);
}
.wedoo-popup__cta:hover {
	background: var(--wedoo-button-hover-bg, var(--wedoo-accent, #1c7ed6));
	filter: var(--wedoo-button-hover-filter, brightness(1.08));
	color: var(--wedoo-btn-text, #fff);
}
.wedoo-popup__cta:active {
	transform: scale(.99);
}
.wedoo-popup__cta:focus-visible {
	outline: 2px solid var(--wedoo-heading-color, #0b2545);
	outline-offset: 2px;
}

.wedoo-popup__disclaimer {
	margin: 0;
	padding-top: 12px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--wedoo-text-color, #333);
	opacity: .75;
}

/* Rich text fields (wp_editor) can output wrapped <p> tags - normalize spacing. */
.wedoo-popup__subheading p,
.wedoo-popup__disclaimer p {
	margin: 0 0 8px;
}
.wedoo-popup__subheading p:last-child,
.wedoo-popup__disclaimer p:last-child {
	margin-bottom: 0;
}
.wedoo-popup__subheading a,
.wedoo-popup__disclaimer a {
	color: var(--wedoo-accent, #1c7ed6);
}

.wedoo-popup__no-thanks {
	align-self: flex-start;
	margin-top: 4px;
	background: none;
	border: 0;
	padding: 0;
	font-size: 13px;
	text-decoration: underline;
	color: var(--wedoo-heading-color, #0b2545);
	cursor: pointer;
	opacity: .8;
}
.wedoo-popup__no-thanks:hover {
	opacity: 1;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* Tablet */
@media (max-width: 782px) {
	.wedoo-popup__content {
		padding: 32px 26px;
	}
	.wedoo-popup__media,
	.wedoo-popup--img-right .wedoo-popup__media {
		min-height: var(--wedoo-image-height-tablet, 220px);
	}
}

/* Mobile: stack image on top, form below - compact floating "popup" look,
   not a full-bleed edge-to-edge sheet. */
@media (max-width: 600px) {
		.wedoo-popup-overlay {
		padding: var(--wedoo-mobile-overlay-padding, 16px);
		align-items: center;
	}

	.wedoo-popup,
	.wedoo-popup--img-right {
		grid-template-columns: 1fr;
		max-width: 100%;
		width: 100%;
		max-height: calc(100vh - (var(--wedoo-mobile-overlay-padding, 16px) * 2));
		border-radius: var(--wedoo-radius, 16px);
	}

	.wedoo-popup__media,
	.wedoo-popup--img-right .wedoo-popup__media {
		order: 1;
		height: auto;
		max-height: 45vh;                 /* όριο ώστε να μη φάει όλο το popup σε landscape/μικρά ύψη */
		display: var(--wedoo-mobile-img-display, block);
		border-radius: var(--wedoo-radius, 16px) var(--wedoo-radius, 16px) 0 0;
	}

	.wedoo-popup__media img {
		width: 100%;
		height: auto;
		max-height: 45vh;
		object-fit: contain;              /* δεν κόβει την εικόνα */
	}

	.wedoo-popup__content,
	.wedoo-popup--img-right .wedoo-popup__content {
		order: 2;
		padding: 0 24px 24px 24px;
	}

	.wedoo-popup__heading {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wedoo-popup-overlay,
	.wedoo-popup {
		transition: none !important;
	}
}
