/* =========================================================================
   N. AHMED — DISCOUNT REGISTRATION POPUP
   Scoped entirely under .nahmed-popup-* so it cannot collide with any
   existing theme/WooCommerce styles. Colors are fixed per the brand spec
   (not tied to the theme's --color-* customizer variables) so the popup
   always renders exactly as designed regardless of the site's color
   settings.
   ========================================================================= */

.nahmed-popup-overlay {
	--nahmed-teal: #159B94;
	--nahmed-teal-hover: #11867F;
	--nahmed-dark: #202735;
	--nahmed-secondary-text: #3F4652;
	--nahmed-border: #E0E0E0;
	--nahmed-white: #FFFFFF;

	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(8, 10, 13, 0.78);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .28s ease, visibility 0s linear .28s;
	padding: 16px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Arial, sans-serif;
}

.nahmed-popup-overlay.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity .28s ease, visibility 0s linear 0s;
}

.nahmed-popup {
	position: relative;
	width: 850px;
	max-width: 92vw;
	height: 620px;
	max-height: 90vh;
	background: var(--nahmed-white);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(8, 10, 13, 0.45), 0 8px 24px rgba(8, 10, 13, 0.25);
	display: flex;
	transform: scale(.94) translateY(12px);
	opacity: 0;
	transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;
}

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

@media (prefers-reduced-motion: reduce) {
	.nahmed-popup-overlay,
	.nahmed-popup {
		transition-duration: .01ms !important;
	}
	.nahmed-popup {
		transform: none;
	}
}

.nahmed-popup-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 5;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: var(--nahmed-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background .15s ease;
}
.nahmed-popup-close:hover { background: #fff; }
.nahmed-popup-close:focus-visible { outline: 2px solid var(--nahmed-teal); outline-offset: 2px; }

/* --------------------------- LEFT (image) ------------------------------ */

.nahmed-popup-left {
	position: relative;
	flex: 0 0 45%;
	background-color: #12262a;
	background-size: cover;
	background-position: center;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 32px 28px;
	color: #fff;
}

.nahmed-popup-left-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(8,10,13,.55) 0%, rgba(8,10,13,.25) 45%, rgba(8,10,13,.75) 100%);
}

.nahmed-popup-brand,
.nahmed-popup-left-footer {
	position: relative;
	z-index: 1;
}

.nahmed-popup-brand-name {
	display: block;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: .3px;
}
.nahmed-popup-brand-sub {
	display: block;
	font-size: 11px;
	letter-spacing: 2.5px;
	font-weight: 600;
	opacity: .9;
	margin-top: 2px;
}

.nahmed-popup-left-title {
	font-size: 19px;
	font-weight: 700;
	margin: 0 0 6px;
	line-height: 1.3;
}
.nahmed-popup-left-text {
	font-size: 13px;
	line-height: 1.5;
	opacity: .92;
	margin: 0;
	max-width: 30ch;
}

/* --------------------------- RIGHT (form) ------------------------------ */

.nahmed-popup-right {
	flex: 0 0 55%;
	background: var(--nahmed-white);
	padding: 40px;
	overflow-y: auto;
}

.nahmed-popup-heading {
	font-size: 25px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--nahmed-dark);
	margin: 0 0 20px;
}

.nahmed-popup-form { display: flex; flex-direction: column; gap: 14px; }

.nahmed-popup-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.nahmed-popup-field { display: flex; flex-direction: column; gap: 6px; }

.nahmed-popup-field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--nahmed-secondary-text);
}

.nahmed-popup-field input,
.nahmed-popup-field select {
	height: 46px;
	padding: 0 14px;
	border: 1px solid var(--nahmed-border);
	border-radius: 8px;
	font-size: 15px;
	color: var(--nahmed-dark);
	background: #fff;
	font-family: inherit;
	width: 100%;
	transition: border-color .15s ease;
}

.nahmed-popup-field select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233F4652' stroke-width='1.6' fill='none' fill-rule='evenodd' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 34px;
}

.nahmed-popup-field input::placeholder { color: #9AA1AB; }

.nahmed-popup-field input:focus,
.nahmed-popup-field select:focus {
	outline: none;
	border-color: var(--nahmed-teal);
	box-shadow: 0 0 0 3px rgba(21, 155, 148, 0.15);
}

.nahmed-popup-field.has-error input,
.nahmed-popup-field.has-error select {
	border-color: #D0362E;
}

.nahmed-popup-error {
	font-size: 12px;
	color: #D0362E;
	min-height: 0;
}

/* Honeypot: present in the DOM for bots, invisible/unreachable for people. */
.nahmed-popup-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.nahmed-popup-submit {
	height: 48px;
	width: 100%;
	background: var(--nahmed-teal);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .5px;
	cursor: pointer;
	transition: background .15s ease;
	margin-top: 4px;
}
.nahmed-popup-submit:hover:not(:disabled) { background: var(--nahmed-teal-hover); }
.nahmed-popup-submit:focus-visible { outline: 2px solid var(--nahmed-teal-hover); outline-offset: 2px; }
.nahmed-popup-submit:disabled { opacity: .75; cursor: not-allowed; }

.nahmed-popup-privacy {
	font-size: 11.5px;
	line-height: 1.5;
	color: #8A9099;
	margin: 10px 0 0;
}

.nahmed-popup-form-error {
	font-size: 13px;
	color: #D0362E;
	margin: 4px 0 0;
	min-height: 0;
}

/* --------------------------- SUCCESS STATE ------------------------------ */

.nahmed-popup-success-state {
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px;
}
.nahmed-popup-success-icon { margin-bottom: 14px; }
.nahmed-popup-success-state h2 {
	font-size: 24px;
	color: var(--nahmed-dark);
	margin: 0 0 10px;
}
.nahmed-popup-success-state p {
	font-size: 14px;
	color: var(--nahmed-secondary-text);
	max-width: 32ch;
	margin: 0;
	line-height: 1.6;
}

/* --------------------------------- MOBILE ------------------------------- */

@media (max-width: 760px) {
	.nahmed-popup {
		width: 94vw;
		max-width: 95vw;
		height: auto;
		max-height: 92vh;
		flex-direction: column;
		overflow-y: auto;
	}
	.nahmed-popup-left {
		flex: 0 0 auto;
		min-height: 180px;
		padding: 22px;
	}
	.nahmed-popup-left-footer { display: none; } /* keep the mobile image compact; form is the priority */
	.nahmed-popup-right { padding: 24px 20px 28px; }
	.nahmed-popup-heading { font-size: 21px; }
	.nahmed-popup-row { grid-template-columns: 1fr; }
	.nahmed-popup-field input,
	.nahmed-popup-field select,
	.nahmed-popup-submit { height: 48px; font-size: 16px; } /* 16px avoids iOS auto-zoom on focus */
	.nahmed-popup-close { top: 10px; right: 10px; width: 38px; height: 38px; }
}
