/**
 * Site popup.
 *
 * Hand-written rather than Tailwind utilities: css/app.css is a committed build
 * artifact, so the popup must not depend on running the mix build.
 * Uses logical properties throughout - the site is RTL.
 */

.mechinot-popup {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	opacity: 0;
	transition: opacity 0.25s ease;
}

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

.mechinot-popup.is-visible {
	opacity: 1;
}

.mechinot-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	cursor: pointer;
}

.mechinot-popup__dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	border-radius: 33px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	transform: scale(0.96) translateY(0.5rem);
	transition: transform 0.25s ease;
	text-align: center;
}

.mechinot-popup--image .mechinot-popup__dialog {
	max-width: 680px;
	overflow: hidden;
}

.mechinot-popup.is-visible .mechinot-popup__dialog {
	transform: none;
}

.mechinot-popup__close {
	position: absolute;
	inset-block-start: 0.875rem;
	inset-inline-end: 0.875rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	color: #000;
	background: #fff;
	border: 1px solid #000;
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.mechinot-popup__close:hover,
.mechinot-popup__close:focus-visible {
	color: #fff;
	background: #000;
}

.mechinot-popup__media {
	display: block;
	line-height: 0;
}

.mechinot-popup__media img {
	display: block;
	width: 100%;
	height: auto;
}

.mechinot-popup__content {
	padding: 3rem 2rem 2.5rem;
}

.mechinot-popup__title {
	margin: 0 0 0.75rem;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
}

.mechinot-popup__text {
	font-size: 1.0625rem;
	line-height: 1.6;
}

.mechinot-popup__text > *:first-child {
	margin-block-start: 0;
}

.mechinot-popup__text > *:last-child {
	margin-block-end: 0;
}

.mechinot-popup__text a {
	text-decoration: underline;
}

.mechinot-popup__button {
	display: inline-block;
	margin-block-start: 1.5rem;
	padding: 0.7rem 2rem;
	font-weight: 700;
	color: #fff;
	background: #d9642c;
	border-radius: 33px;
	transition: background-color 0.2s ease;
}

.mechinot-popup__button:hover,
.mechinot-popup__button:focus-visible {
	background: #00537f;
}

body.mechinot-popup-open {
	overflow: hidden;
}

@media (max-width: 599px) {
	.mechinot-popup__dialog {
		border-radius: 24px;
	}

	.mechinot-popup__content {
		padding: 3rem 1.25rem 2rem;
	}

	.mechinot-popup__title {
		font-size: 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {

	.mechinot-popup,
	.mechinot-popup__dialog {
		transition: none;
	}

	.mechinot-popup__dialog {
		transform: none;
	}
}
