/**
 * Vemax Company - Addon — Estado de sucesso do catálogo e notificação.
 *
 * Valores extraídos do site original:
 *   CatalogPage.tsx  -> card de sucesso
 *   button.tsx       -> variantes e tamanhos dos botões
 *   sonner.tsx       -> tokens do toast (--popover, --border)
 *   index.css        -> paleta oklch
 *
 * Conversões oklch -> rgb usadas aqui:
 *   oklch(0.22 0.04 260)  = #0F1B2D  (card / popover)
 *   oklch(0.85 0.18 85)   = #FFC200  (dourado)
 *   oklch(0.80 0.16 85)   = #EDB417  (dourado hover)
 *   oklch(0.20 0.05 260)  = #08152C  (texto sobre dourado)
 *   oklch(0.32 0.04 260)  = #273347  (borda do popover)
 *   oklch(0.95 0.005 90)  = #F0EEEB  (popover-foreground)
 */

/* ============================================================
   CARD DE SUCESSO
   A própria .vemax-catalog-access-card vira o card, com o estado
   .is-vemax-success. Não há card aninhado.
   ============================================================ */

.vemax-catalog-access-card.is-vemax-success {
	/* p-6 / rounded-2xl / bg / border dourada / shadow-2xl */
	box-sizing: border-box;
	padding: 24px;
	border-radius: 16px;
	background-color: #0f1b2d;
	background-image: none;
	border: 1px solid rgba(255, 194, 0, 0.3);
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	/* Neutraliza sobras de layout do Elementor no container. */
	margin: 0;
	min-height: 0;
	height: auto;
	width: 100%;
	display: block;
	text-align: left;
}

/* lg:p-8 — a partir de 1024px, como no original. */
@media (min-width: 1024px) {
	.vemax-catalog-access-card.is-vemax-success {
		padding: 32px;
	}
}

/* O Elementor costuma aplicar padding/estilo nos wrappers internos:
   zeramos apenas dentro do card em estado de sucesso. */
.vemax-catalog-access-card.is-vemax-success > .elementor-widget-wrap,
.vemax-catalog-access-card.is-vemax-success > .elementor-element,
.vemax-catalog-access-card.is-vemax-success .elementor-widget-container {
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
	box-shadow: none;
}

/* ---- Cabeçalho: text-center mb-6 ---- */

.vemax-catalog-success__head {
	text-align: center;
	margin-bottom: 24px;
}

/* w-16 h-16 rounded-full bg-[gold/0.15] mx-auto mb-4 */
.vemax-catalog-success__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	border-radius: 9999px;
	background-color: rgba(255, 194, 0, 0.15);
	color: #ffc200;
	flex: 0 0 auto;
}

/* w-8 h-8 */
.vemax-catalog-success__check {
	width: 32px;
	height: 32px;
	display: block;
}

/* text-xl font-bold text-white mb-2 */
.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__title {
	margin: 0 0 8px;
	padding: 0;
	font-family: "Open Sans", sans-serif;
	font-size: 20px;
	line-height: 1.4;
	font-weight: 700;
	color: #ffffff;
}

/* text-sm text-white/60 */
.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__text {
	margin: 0;
	padding: 0;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	line-height: 1.625;
	color: rgba(255, 255, 255, 0.6);
}

/* ---- Botões: button.tsx size="lg" ----
   h-10 (40px) · rounded-md (6px) · px-6 · text-sm · gap-2 · svg 20px */

.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 40px;
	padding: 8px 24px;
	border: 0;
	border-radius: 6px;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	line-height: 1.2;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 200ms ease, border-color 200ms ease,
		color 200ms ease, transform 200ms ease;
}

.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button-icon {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	display: block;
}

/* Primário: bg dourado, texto escuro, hover mais fechado, active scale .97 */
.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button--primary {
	background-color: #ffc200;
	color: #08152c;
}

.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button--primary:hover,
.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button--primary:focus-visible {
	background-color: #edb417;
	color: #08152c;
}

.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button--primary:active {
	transform: scale(0.97);
}

/* Secundário: variante outline do button.tsx */
.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button--ghost {
	margin-top: 12px;
	background-color: transparent;
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #ffffff;
	font-weight: 500;
}

.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button--ghost:hover,
.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button--ghost:focus-visible {
	background-color: rgba(255, 255, 255, 0.05);
	color: #ffffff;
}

/* focus-visible discreto, como o ring do original. */
.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button:focus-visible {
	outline: 2px solid rgba(255, 194, 0, 0.5);
	outline-offset: 2px;
}

.vemax-catalog-success:focus {
	outline: none;
}

/* ============================================================
   NOTIFICAÇÃO — visual do Sonner
   ============================================================ */

.vemax-toast {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 999999;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 356px;
	max-width: calc(100vw - 32px);
	padding: 16px;
	border-radius: 8px;
	background-color: #0f1b2d;
	border: 1px solid #273347;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	font-family: "Open Sans", sans-serif;
	/* Entrada/saída suaves. */
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 300ms ease, transform 300ms ease;
}

.vemax-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.vemax-toast__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	color: #ffc200;
}

.vemax-toast__check {
	width: 20px;
	height: 20px;
	display: block;
}

/* text-sm font-medium, como a descrição do Sonner. */
.vemax-toast__text {
	margin: 0;
	padding: 0;
	flex: 1 1 auto;
	font-size: 13px;
	line-height: 1.4;
	font-weight: 500;
	color: #f0eeeb;
}

/* ---- Botão de fechar: reset completo contra o CSS do Elementor ----
   O tema/Elementor aplica border, background e padding em <button>.
   Especificidade alta e limitada ao componente. */

.vemax-toast .vemax-toast__close,
.vemax-toast button.vemax-toast__close,
.vemax-toast .vemax-toast__close:hover,
.vemax-toast .vemax-toast__close:focus,
.vemax-toast .vemax-toast__close:focus-visible,
.vemax-toast .vemax-toast__close:active,
.vemax-toast .vemax-toast__close:visited {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
	background: none;
	background-color: transparent;
	background-image: none;
	border: 0;
	border-color: transparent;
	border-radius: 4px;
	box-shadow: none;
	text-shadow: none;
	outline: none;
	font: inherit;
	line-height: 0;
	text-decoration: none;
	cursor: pointer;
	color: rgba(240, 238, 235, 0.5);
	transition: color 200ms ease;
}

/* Nenhum pseudo-elemento herdado do Elementor. */
.vemax-toast .vemax-toast__close::before,
.vemax-toast .vemax-toast__close::after {
	content: none !important;
	display: none !important;
	border: 0 !important;
	background: none !important;
}

.vemax-toast .vemax-toast__close:hover {
	color: #f0eeeb;
}

/* Foco acessível discreto, do próprio componente. */
.vemax-toast .vemax-toast__close:focus-visible {
	outline: 2px solid rgba(255, 194, 0, 0.5);
	outline-offset: 2px;
}

.vemax-toast__close-icon {
	width: 14px;
	height: 14px;
	display: block;
	pointer-events: none;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */

/* Tablet */
@media (max-width: 1023px) {
	.vemax-toast {
		width: 340px;
	}
}

/* Celular: largura total com margem segura, como o Sonner. */
@media (max-width: 600px) {
	.vemax-catalog-access-card.is-vemax-success {
		padding: 20px;
	}

	.vemax-catalog-success__icon {
		width: 56px;
		height: 56px;
	}

	.vemax-catalog-success__check {
		width: 28px;
		height: 28px;
	}

	.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__title {
		font-size: 18px;
	}

	.vemax-toast {
		right: 16px;
		left: 16px;
		bottom: 16px;
		width: auto;
		max-width: none;
	}
}

/* ============================================================
   ACESSIBILIDADE
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button,
	.vemax-toast,
	.vemax-toast .vemax-toast__close {
		transition: none;
	}

	.vemax-catalog-access-card.is-vemax-success .vemax-catalog-success__button--primary:active {
		transform: none;
	}

	.vemax-toast {
		transform: none;
	}
}
