/* UEB Web Push - caixa de convite do visitante */

.rdwp-box {
	--rdwp-accent: #2563eb;
	--rdwp-bg: #ffffff;
	--rdwp-text: #111827;
	--rdwp-muted: #6b7280;
	--rdwp-border: rgba(17, 24, 39, .1);

	position: fixed;
	z-index: 999990;
	width: min(380px, calc(100vw - 32px));
	box-sizing: border-box;
	padding: 18px 20px 16px;
	background: var(--rdwp-bg);
	color: var(--rdwp-text);
	border: 1px solid var(--rdwp-border);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;

	opacity: 0;
	transform: translateY(12px);
	transition: opacity .28s ease, transform .28s ease;
	pointer-events: none;
}

.rdwp-box.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* Posicoes */
.rdwp-pos-bottom-right { bottom: 20px; right: 20px; }
.rdwp-pos-bottom-left  { bottom: 20px; left: 20px; }
.rdwp-pos-top-right    { top: 20px; right: 20px; transform: translateY(-12px); }
.rdwp-pos-top-left     { top: 20px; left: 20px; transform: translateY(-12px); }

.rdwp-pos-top-right.is-visible,
.rdwp-pos-top-left.is-visible { transform: translateY(0); }

.rdwp-pos-center {
	top: 50%;
	left: 50%;
	transform: translate(-50%, calc(-50% + 12px));
}
.rdwp-pos-center.is-visible { transform: translate(-50%, -50%); }

/* Conteudo */
.rdwp-box__head {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.rdwp-box__icon {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 10px;
	object-fit: cover;
}

.rdwp-box__icon--bell {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	background: color-mix(in srgb, var(--rdwp-accent) 12%, transparent);
}

.rdwp-box__title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 650;
	color: var(--rdwp-text);
}

.rdwp-box__message {
	margin: 0;
	font-size: 14px;
	color: var(--rdwp-muted);
}

.rdwp-box__actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 16px;
}

.rdwp-box__btn {
	appearance: none;
	border: 0;
	border-radius: 9px;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: filter .15s ease, background-color .15s ease;
}

.rdwp-box__btn--primary {
	background: var(--rdwp-accent);
	color: #fff;
}
.rdwp-box__btn--primary:hover { filter: brightness(1.08); }

.rdwp-box__btn--ghost {
	background: transparent;
	color: var(--rdwp-muted);
}
.rdwp-box__btn--ghost:hover { background: rgba(17, 24, 39, .06); }

.rdwp-box__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 28px;
	height: 28px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: var(--rdwp-muted);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.rdwp-box__close:hover { background: rgba(17, 24, 39, .06); }

.rdwp-box__btn:focus-visible,
.rdwp-box__close:focus-visible {
	outline: 2px solid var(--rdwp-accent);
	outline-offset: 2px;
}

/* Botao do shortcode */
.rdwp-manual-button {
	appearance: none;
	border: 0;
	border-radius: 9px;
	padding: 11px 22px;
	background: #2563eb;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.rdwp-manual-button:disabled { opacity: .6; cursor: default; }

/* Telas pequenas: ocupa a largura, ancorado embaixo */
@media (max-width: 480px) {
	.rdwp-box {
		left: 12px;
		right: 12px;
		bottom: 12px;
		top: auto;
		width: auto;
		transform: translateY(12px);
	}
	.rdwp-pos-center.is-visible,
	.rdwp-box.is-visible { transform: translateY(0); }
}

@media (prefers-color-scheme: dark) {
	.rdwp-box {
		--rdwp-bg: #1f2430;
		--rdwp-text: #f3f4f6;
		--rdwp-muted: #9ca3af;
		--rdwp-border: rgba(255, 255, 255, .12);
		box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
	}
	.rdwp-box__btn--ghost:hover,
	.rdwp-box__close:hover { background: rgba(255, 255, 255, .08); }
}

@media (prefers-reduced-motion: reduce) {
	.rdwp-box { transition: opacity .01s linear; }
}
