/* SmartWeatherPush — subscription modal (overlay, RTL-ready, mobile-safe) */
.swp-overlay,
.swp-overlay * {
	box-sizing: border-box;
}

.swp-overlay[hidden] {
	display: none !important;
}

.swp-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 42, 0.55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.2s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.swp-overlay.swp-in {
	opacity: 1;
}

.swp-dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	margin: auto;
	padding: 28px 24px 20px;
	border-radius: 22px;
	background: #ffffff;
	color: #0f172a;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
	text-align: center;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.6;
	transform: translateY(12px) scale(0.98);
	transition: transform 0.22s ease;
	outline: none;
	overflow-wrap: anywhere;
}

.swp-in .swp-dialog {
	transform: none;
}

.swp-x {
	position: absolute;
	top: 10px;
	inset-inline-end: 10px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f5f9;
	color: #334155;
	font-size: 22px;
	line-height: 36px;
	cursor: pointer;
}

.swp-x:hover,
.swp-x:focus-visible {
	background: #e2e8f0;
}

.swp-icon {
	width: 76px;
	height: 76px;
	margin: 0 auto 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 22px;
	background: linear-gradient(135deg, #eff6ff, #fef9c3);
}

.swp-title {
	margin: 0 0 8px;
	padding: 0 24px;
	font-size: 1.25em;
	font-weight: 700;
	line-height: 1.4;
	color: #0f172a;
}

.swp-desc {
	margin: 0 0 16px;
	color: #475569;
	font-size: 0.97em;
}

.swp-status {
	margin: 0 0 16px;
	padding: 10px 12px;
	border-radius: 12px;
	background: #f1f5f9;
	color: #334155;
	font-size: 0.92em;
	white-space: pre-line;
	text-align: start;
}

.swp-status-success,
.swp-status-success_city {
	background: #ecfdf5;
	color: #065f46;
}

.swp-status-success_nol,
.swp-status-dismissed {
	background: #fffbeb;
	color: #92400e;
}

.swp-status-denied,
.swp-status-unsupported,
.swp-status-insecure,
.swp-status-sw,
.swp-status-config,
.swp-status-token,
.swp-status-generic {
	background: #fef2f2;
	color: #991b1b;
}

.swp-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.swp-btn,
.swp-open-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	min-height: 48px;
	padding: 12px 18px;
	border-radius: 14px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 600;
	font-size: 1em;
	line-height: 1.3;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.1s ease;
	text-decoration: none;
}

.swp-btn:active {
	transform: scale(0.99);
}

.swp-btn-primary,
.swp-open-btn {
	background: #2563eb;
	color: #ffffff;
}

.swp-btn-primary:hover,
.swp-btn-primary:focus-visible,
.swp-open-btn:hover {
	background: #1d4ed8;
	color: #ffffff;
}

.swp-btn-primary[disabled] {
	opacity: 0.7;
	cursor: progress;
}

.swp-btn-secondary {
	background: transparent;
	color: #475569;
	border-color: #e2e8f0;
}

.swp-btn-secondary:hover,
.swp-btn-secondary:focus-visible {
	background: #f8fafc;
}

.swp-btn:focus-visible,
.swp-x:focus-visible,
.swp-open-btn:focus-visible {
	outline: 3px solid #93c5fd;
	outline-offset: 2px;
}

.swp-btn[hidden] {
	display: none;
}

.swp-foot {
	margin: 14px 0 0;
	font-size: 0.8em;
	color: #64748b;
}

.swp-tech {
	margin-top: 12px;
	text-align: start;
	font-size: 0.8em;
	color: #64748b;
}

.swp-tech pre {
	margin: 6px 0 0;
	padding: 8px;
	max-height: 140px;
	overflow: auto;
	white-space: pre-wrap;
	direction: ltr;
	background: #f8fafc;
	border-radius: 8px;
}

.swp-open-btn {
	width: auto;
}

html.swp-lock,
html.swp-lock body {
	overflow: hidden;
}

@media (min-width: 480px) {
	.swp-dialog {
		padding: 32px 30px 22px;
	}
}

@media (max-width: 360px) {
	.swp-dialog {
		padding: 24px 16px 16px;
		border-radius: 18px;
		font-size: 15px;
	}
	.swp-title {
		padding: 0 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.swp-overlay,
	.swp-dialog {
		transition: none;
	}
}

@media (prefers-color-scheme: dark) {
	.swp-dialog {
		background: #0f172a;
		color: #e2e8f0;
	}
	.swp-title {
		color: #f8fafc;
	}
	.swp-desc,
	.swp-foot {
		color: #94a3b8;
	}
	.swp-x {
		background: #1e293b;
		color: #cbd5e1;
	}
	.swp-status {
		background: #1e293b;
		color: #cbd5e1;
	}
	.swp-btn-secondary {
		color: #cbd5e1;
		border-color: #334155;
	}
	.swp-btn-secondary:hover {
		background: #1e293b;
	}
	.swp-tech pre {
		background: #1e293b;
	}
}
