/* ============================================================
   Tamang Society — Popup  (always dark)
   ============================================================ */

/* Overlay / backdrop */
.tamang-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(4, 10, 20, 0.80);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	opacity: 0;
	transition: opacity 0.30s ease;
}

.tamang-popup-overlay.is-visible {
	opacity: 1;
}

/* hidden attribute suppresses display entirely (before first open) */
.tamang-popup-overlay[hidden] {
	display: none !important;
}

/* Popup card — always dark */
.tamang-popup {
	position: relative;
	background: #1A2A3A;
	border-radius: 16px;
	max-width: 480px;
	width: 100%;
	box-shadow:
		0 4px 6px  rgba(0, 0, 0, 0.25),
		0 20px 60px rgba(0, 0, 0, 0.60);
	transform: translateY(24px) scale(0.96);
	opacity: 0;
	transition:
		transform 0.38s cubic-bezier(0.34, 1.26, 0.64, 1),
		opacity   0.30s ease;
	overflow: hidden;
}

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

/* ── Close button ──────────────────────────────────────── */
.tamang-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #162231;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	color: #E8EDF2;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.40);
	transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
	padding: 0;
}

.tamang-popup__close:hover,
.tamang-popup__close:focus-visible {
	background: #243447;
	transform: scale(1.12);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.50);
	outline: none;
}

/* ── Header: gradient bar (no image) ──────────────────── */
.tamang-popup__header-bar {
	height: 5px;
	background: linear-gradient(90deg, #1E3A5F 0%, #B22234 55%, #D4A843 100%);
}

/* ── Header: image ────────────────────────────────────── */
.tamang-popup__media {
	height: 190px;
	overflow: hidden;
}

.tamang-popup__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Body ─────────────────────────────────────────────── */
.tamang-popup__body {
	padding: 28px 32px 30px;
}

/* Badge — gold on dark */
.tamang-popup__badge {
	display: inline-block;
	background: #D4A843;
	color: #1E2328;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 1.3px;
	text-transform: uppercase;
	padding: 3px 12px;
	border-radius: 20px;
	margin-bottom: 12px;
}

/* Title */
.tamang-popup__title {
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
	font-size: clamp(1.25rem, 3vw, 1.6rem);
	font-weight: 700;
	color: #E8EDF2;
	margin: 0 0 12px;
	line-height: 1.28;
}

/* Content */
.tamang-popup__content {
	font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
	font-size: 0.9375rem;
	color: #8D9AAB;
	line-height: 1.65;
	margin-bottom: 22px;
}

.tamang-popup__content p {
	margin: 0 0 0.7em;
}

.tamang-popup__content p:last-child {
	margin-bottom: 0;
}

/* ── Actions row ──────────────────────────────────────── */
.tamang-popup__actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.tamang-popup__actions--center {
	justify-content: center;
}

/* CTA button */
.tamang-popup__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0.72rem 1.5rem;
	border-radius: 8px;
	font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	border: none;
	cursor: pointer;
	white-space: nowrap;
	transition: filter 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.tamang-popup__btn:hover,
.tamang-popup__btn:focus-visible {
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.30);
	outline: none;
}

/* Primary — lighter navy for legibility on dark card */
.tamang-popup__btn--primary {
	background: #2A5080;
	color: #E8EDF2;
}

.tamang-popup__btn--secondary {
	background: #D4A843;
	color: #1E2328;
}

.tamang-popup__btn--gold {
	background: #D4A843;
	color: #1E2328;
}

/* Dismiss text-link */
.tamang-popup__dismiss {
	background: none;
	border: none;
	color: #8D9AAB;
	font-family: 'Source Sans 3', sans-serif;
	font-size: 0.8125rem;
	cursor: pointer;
	padding: 0;
	transition: color 0.15s;
}

.tamang-popup__dismiss:hover {
	color: #E8EDF2;
}

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 560px) {
	.tamang-popup__body {
		padding: 20px 20px 22px;
	}

	.tamang-popup__media {
		height: 150px;
	}

	.tamang-popup__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.tamang-popup__btn {
		justify-content: center;
	}

	.tamang-popup__dismiss {
		text-align: center;
	}
}

/* ============================================================
   Multi-panel / form styles
   ============================================================ */

/* Panels */
.tamang-popup__panel {
	display: none;
}

.tamang-popup__panel.is-active {
	display: block;
	animation: tmpp-enter 0.28s ease both;
}

@keyframes tmpp-enter {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Form topbar */
.tamang-popup__form-topbar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 20px 12px;
	border-bottom: 1px solid #243447;
	background: #1A2A3A;
}

.tamang-popup__back-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: none;
	border: none;
	color: #8D9AAB;
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 5px;
	transition: background 0.15s, color 0.15s;
	flex-shrink: 0;
}

.tamang-popup__back-btn:hover {
	background: #162231;
	color: #E8EDF2;
}

.tamang-popup__form-heading {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1rem;
	font-weight: 700;
	color: #E8EDF2;
}

/* Form body padding */
.tamang-popup__body--form {
	padding: 18px 28px 24px;
}

.tamang-popup__form-note {
	font-size: 0.8125rem;
	color: #8D9AAB;
	margin: 0 0 16px;
	line-height: 1.5;
}

/* Form fields */
.tmpu-field {
	margin-bottom: 12px;
}

.tmpu-field label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #E8EDF2;
	margin-bottom: 5px;
}

.tmpu-req {
	color: #D4A843;
	margin-left: 2px;
}

.tmpu-optional {
	font-weight: 400;
	color: #8D9AAB;
	font-size: 0.75rem;
	margin-left: 4px;
}

.tmpu-field input,
.tmpu-field textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1.5px solid #243447;
	border-radius: 7px;
	padding: 9px 12px;
	font-family: 'Source Sans 3', sans-serif;
	font-size: 0.875rem;
	color: #E8EDF2;
	background: #162231;
	transition: border-color 0.15s, box-shadow 0.15s;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.tmpu-field input::placeholder,
.tmpu-field textarea::placeholder {
	color: #8D9AAB;
	opacity: 0.8;
}

.tmpu-field input:focus,
.tmpu-field textarea:focus {
	border-color: #6B9FD4;
	box-shadow: 0 0 0 3px rgba(107, 159, 212, 0.15);
	background: #1A2A3A;
}

.tmpu-field textarea {
	resize: vertical;
	min-height: 76px;
}

/* Two-column row */
.tmpu-row2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 12px;
}

.tmpu-row2 .tmpu-field {
	margin-bottom: 0;
}

/* Submit button full-width */
.tmpu-submit-btn {
	width: 100%;
	justify-content: center;
	margin-top: 4px;
}

/* Error */
.tmpu-error {
	margin-top: 10px;
	padding: 10px 14px;
	background: rgba(185, 28, 28, 0.14);
	border: 1px solid rgba(248, 113, 113, 0.30);
	border-radius: 7px;
	color: #f87171;
	font-size: 0.8125rem;
	line-height: 1.5;
}

/* "Not a member?" link */
.tamang-popup__new-member-note {
	margin: 14px 0 0;
	font-size: 0.8rem;
	color: #8D9AAB;
	text-align: center;
}

.tamang-popup__new-member-note a {
	color: #D4A843;
	font-weight: 600;
	text-decoration: none;
}

.tamang-popup__new-member-note a:hover {
	text-decoration: underline;
}

/* Success panel */
.tamang-popup__body--success {
	padding: 32px 32px 36px;
	text-align: center;
	background: #1A2A3A;
}

.tmpu-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	background: linear-gradient(135deg, #4A7C59, #3a6348);
	border-radius: 50%;
	color: #fff;
	margin-bottom: 16px;
	box-shadow: 0 6px 20px rgba(74, 124, 89, 0.30);
}

.tmpu-success-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.35rem;
	font-weight: 700;
	color: #E8EDF2;
	margin: 0 0 10px;
}

.tmpu-success-msg {
	font-size: 0.9rem;
	color: #8D9AAB;
	line-height: 1.65;
	margin: 0 0 20px;
}

/* Mobile additions */
@media (max-width: 560px) {
	.tmpu-row2 {
		grid-template-columns: 1fr;
	}

	.tamang-popup__body--form {
		padding: 14px 16px 18px;
	}

	.tamang-popup__body--success {
		padding: 24px 20px 28px;
	}
}
