/* TP Login Popup */
html.tplp-lock,
html.tplp-lock body { overflow: hidden !important; }

.tplp-overlay {
	--tplp-primary: #b4bdab;
	--tplp-secondary: #d4dfd7;
	--tplp-text: #1f2620;
	--tplp-btn-text: #1f2620;
	--tplp-bg: #ffffff;
	--tplp-blur: 6px;
	--tplp-overlay: .3;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	direction: rtl;
	background: rgba(24, 30, 26, var(--tplp-overlay));
	-webkit-backdrop-filter: blur(var(--tplp-blur));
	backdrop-filter: blur(var(--tplp-blur));
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility 0s linear .25s;
}
.tplp-overlay.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity .25s ease, visibility 0s;
}

.tplp-overlay .tplp-modal {
	position: relative;
	width: 100%;
	max-width: 400px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: var(--tplp-bg);
	color: var(--tplp-text);
	border-radius: 20px;
	box-shadow: 0 30px 80px -20px rgba(24, 30, 26, .35);
	font-family: inherit;
	text-align: right;
	transform: translateY(14px);
	transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.tplp-overlay.is-open .tplp-modal { transform: none; }

/* Head */
.tplp-overlay .tplp-head {
	padding: 34px 32px 22px;
	background: var(--tplp-secondary);
	border-radius: 20px 20px 0 0;
	text-align: center;
}
.tplp-overlay .tplp-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: var(--tplp-bg);
	color: var(--tplp-text);
}
.tplp-overlay .tplp-title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--tplp-text);
	text-transform: none;
	border: 0;
}
.tplp-overlay .tplp-subtitle {
	margin: 8px auto 0;
	max-width: 30ch;
	font-size: 14px;
	line-height: 1.5;
	opacity: .75;
}

/* Close */
.tplp-overlay .tplp-close {
	position: absolute;
	top: 12px;
	left: 12px;
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--tplp-text);
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s;
}
.tplp-overlay .tplp-close:hover { background: rgba(255, 255, 255, .6); }

/* Form */
.tplp-overlay .tplp-form { padding: 24px 32px 30px; margin: 0; }

.tplp-overlay .tplp-field { margin: 0 0 16px; }
.tplp-overlay .tplp-field label {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--tplp-text);
}
.tplp-overlay .tplp-field input {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	font-family: inherit;
	font-size: 16px; /* מונע zoom ב-iOS */
	line-height: 48px;
	color: var(--tplp-text);
	background: var(--tplp-secondary);
	border: 1.5px solid transparent;
	border-radius: 10px;
	box-shadow: none;
	outline: none;
	transition: border-color .15s, background-color .15s;
	-webkit-appearance: none;
	appearance: none;
}
.tplp-overlay .tplp-field input:focus {
	background: var(--tplp-bg);
	border-color: var(--tplp-primary);
}
.tplp-overlay .tplp-field input[aria-invalid="true"] { border-color: #b3261e; }

.tplp-overlay .tplp-pass-wrap { position: relative; }
.tplp-overlay .tplp-pass-wrap input { padding-left: 46px; }
.tplp-overlay .tplp-toggle {
	position: absolute;
	top: 50%;
	left: 6px;
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--tplp-text);
	opacity: .6;
	box-shadow: none;
	cursor: pointer;
}
.tplp-overlay .tplp-toggle:hover,
.tplp-overlay .tplp-toggle[aria-pressed="true"] { opacity: 1; }

.tplp-overlay .tplp-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 4px 0 18px;
	font-size: 14px;
}
.tplp-overlay .tplp-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	cursor: pointer;
	font-weight: 400;
}
.tplp-overlay .tplp-check input {
	width: 17px;
	height: 17px;
	margin: 0;
	accent-color: var(--tplp-primary);
}
.tplp-overlay .tplp-link {
	color: var(--tplp-text);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--tplp-primary);
}
.tplp-overlay .tplp-link:hover { text-decoration-thickness: 2px; }

/* Message */
.tplp-overlay .tplp-msg {
	display: none;
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.45;
}
.tplp-overlay .tplp-msg.is-error { display: block; background: #fbeceb; color: #8c1d18; }
.tplp-overlay .tplp-msg.is-success { display: block; background: var(--tplp-secondary); color: var(--tplp-text); }

/* Submit */
.tplp-overlay .tplp-submit {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 20px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--tplp-btn-text);
	background: var(--tplp-primary);
	border: 0;
	border-radius: 10px;
	box-shadow: none;
	cursor: pointer;
	transition: filter .15s, transform .1s;
}
.tplp-overlay .tplp-submit:hover { filter: brightness(.94); }
.tplp-overlay .tplp-submit:active { transform: scale(.99); }
.tplp-overlay .tplp-submit[disabled] { cursor: wait; }

.tplp-overlay .tplp-spinner {
	display: none;
	width: 20px;
	height: 20px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: tplp-spin .7s linear infinite;
}
.tplp-overlay .is-loading .tplp-submit-text { visibility: hidden; }
.tplp-overlay .is-loading .tplp-spinner { display: block; position: absolute; }

@keyframes tplp-spin { to { transform: rotate(360deg); } }

.tplp-overlay .tplp-modal.is-shake { animation: tplp-shake .35s; }
@keyframes tplp-shake {
	25% { transform: translateX(-6px); }
	50% { transform: translateX(6px); }
	75% { transform: translateX(-3px); }
}

/* Focus */
.tplp-overlay button:focus-visible,
.tplp-overlay a:focus-visible,
.tplp-overlay .tplp-check input:focus-visible {
	outline: 2px solid var(--tplp-text);
	outline-offset: 2px;
}

/* Mobile: bottom sheet */
@media (max-width: 520px) {
	.tplp-overlay { align-items: flex-end; padding: 0; }
	.tplp-overlay .tplp-modal {
		max-width: none;
		max-height: 92vh;
		border-radius: 20px 20px 0 0;
		transform: translateY(40px);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	.tplp-overlay .tplp-head { padding: 28px 22px 18px; }
	.tplp-overlay .tplp-form { padding: 20px 22px 26px; }
}

@media (prefers-reduced-motion: reduce) {
	.tplp-overlay,
	.tplp-overlay .tplp-modal { transition: none; }
	.tplp-overlay .tplp-modal.is-shake { animation: none; }
}
