/**
 * Barra de Notificação Simples - Carrinho Marvit
 * Apenas uma barra discreta no topo da tela
 */

/* ===== BARRA DE NOTIFICAÇÃO ===== */
#marvit-notification-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999999;
	background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
	color: white;
	transform: translateY(-100%);
	transition: transform 0.3s ease;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#marvit-notification-bar.show {
	transform: translateY(0);
}

.notification-content {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	max-width: 1200px;
	margin: 0 auto;
	gap: 10px;
	position: relative;
}

.notification-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.notification-text {
	flex: 1;
	text-align: center;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
}

.notification-close {
	position: absolute;
	right: 16px;
	background: none;
	border: none;
	color: white;
	cursor: pointer;
	font-size: 20px;
	font-weight: bold;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.2s ease;
	opacity: 0.8;
}

.notification-close:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.1);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
	.notification-content {
		padding: 10px 15px;
		gap: 8px;
	}

	.notification-text {
		font-size: 13px;
	}

	.notification-close {
		right: 10px;
		width: 20px;
		height: 20px;
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.notification-content {
		padding: 8px 12px;
	}

	.notification-text {
		font-size: 12px;
		padding-right: 30px; /* Espaço para o botão fechar */
	}
}

.cart-success-content {
	position: relative;
	background: white;
	border-radius: 16px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
	max-width: 520px;
	width: 90%;
	max-height: 90vh;
	overflow: hidden;
	transform: scale(0.9) translateY(20px);
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	border: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-success-popup.show .cart-success-content {
	transform: scale(1) translateY(0);
}

/* Header do popup */
.cart-success-header {
	padding: 32px 32px 24px;
	text-align: center;
	position: relative;
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	border-bottom: 1px solid #e2e8f0;
}

.cart-success-icon {
	margin-bottom: 16px;
	display: inline-block;
	animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
	0% {
		transform: scale(0.3);
		opacity: 0;
	}
	50% {
		transform: scale(1.1);
		opacity: 0.8;
	}
	70% {
		transform: scale(0.95);
		opacity: 1;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.cart-success-header h3 {
	margin: 0 0 8px;
	color: #1e293b;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.5px;
}

.cart-success-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px;
	color: #64748b;
	border-radius: 50%;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
}

.cart-success-close:hover {
	background: rgba(0, 0, 0, 0.05);
	color: #1e293b;
	transform: rotate(90deg);
}

/* Corpo do popup */
.cart-success-body {
	padding: 24px 32px;
	text-align: center;
}

.cart-success-message {
	margin: 0 0 12px;
	color: #334155;
	font-size: 17px;
	line-height: 1.5;
	font-weight: 500;
}

.cart-success-quantity {
	margin: 0;
	color: #64748b;
	font-size: 15px;
	font-weight: 500;
}

/* Ações do popup */
.cart-success-actions {
	padding: 24px 32px 32px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cart-success-continue,
.cart-success-view-cart,
.cart-success-checkout {
	padding: 16px 24px;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border: none;
	display: inline-block;
	line-height: 1.2;
	letter-spacing: 0.5px;
	position: relative;
	overflow: hidden;
}

.cart-success-continue {
	background: #f1f5f9;
	color: #475569;
	border: 2px solid #e2e8f0;
	order: 3;
}

.cart-success-continue:hover {
	background: #e2e8f0;
	color: #334155;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.cart-success-view-cart {
	background: #8b6b9b;
	color: white;
	border: 2px solid #8b6b9b;
	order: 2;
}

.cart-success-view-cart:hover {
	background: #7a5a8a;
	border-color: #7a5a8a;
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(139, 107, 155, 0.35);
}

.cart-success-checkout {
	background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
	color: white;
	border: 2px solid #22c55e;
	order: 1;
}

.cart-success-checkout:hover {
	background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
	border-color: #16a34a;
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
}

/* ===== NOTIFICAÇÕES TOAST ===== */
.toast-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 999999;
	max-width: 420px;
	width: 100%;
	pointer-events: none;
}

.toast {
	background: white;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	margin-bottom: 12px;
	padding: 16px 20px;
	transform: translateX(120%);
	opacity: 0;
	transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	border-left: 4px solid #22c55e;
	display: flex;
	align-items: center;
	gap: 12px;
	pointer-events: auto;
	border: 1px solid rgba(0, 0, 0, 0.05);
}

.toast.show {
	transform: translateX(0);
	opacity: 1;
}

.toast.success {
	border-left-color: #22c55e;
}

.toast.error {
	border-left-color: #ef4444;
}

.toast-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	color: #22c55e;
}

.toast.error .toast-icon {
	color: #ef4444;
}

.toast-content {
	flex: 1;
	min-width: 0;
}

.toast-title {
	font-weight: 600;
	color: #1e293b;
	margin: 0 0 4px;
	font-size: 14px;
	line-height: 1.3;
}

.toast-message {
	color: #64748b;
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	word-wrap: break-word;
}

.toast-close {
	background: none;
	border: none;
	cursor: pointer;
	color: #94a3b8;
	padding: 4px;
	border-radius: 6px;
	transition: all 0.2s ease;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.toast-close:hover {
	background: #f1f5f9;
	color: #475569;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 640px) {
	.cart-success-content {
		width: 95%;
		margin: 20px;
		border-radius: 12px;
	}

	.cart-success-header,
	.cart-success-body,
	.cart-success-actions {
		padding-left: 20px;
		padding-right: 20px;
	}

	.cart-success-header {
		padding-top: 24px;
		padding-bottom: 20px;
	}

	.cart-success-header h3 {
		font-size: 22px;
	}

	.cart-success-body {
		padding-top: 20px;
		padding-bottom: 20px;
	}

	.cart-success-actions {
		gap: 12px;
		padding-bottom: 24px;
	}

	.cart-success-continue,
	.cart-success-view-cart,
	.cart-success-checkout {
		padding: 14px 20px;
		font-size: 15px;
	}

	/* Toast responsivo */
	.toast-container {
		top: 10px;
		right: 10px;
		left: 10px;
		max-width: none;
	}

	.toast {
		padding: 14px 16px;
		border-radius: 10px;
	}

	.toast-title {
		font-size: 13px;
	}

	.toast-message {
		font-size: 12px;
	}
}

@media (max-width: 480px) {
	.cart-success-content {
		width: 98%;
		margin: 10px;
	}

	.cart-success-header h3 {
		font-size: 20px;
	}

	.cart-success-message {
		font-size: 16px;
	}
}

/* ===== ANIMAÇÕES DE ENTRADA ===== */
@keyframes slideInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.cart-success-popup.show .cart-success-actions > * {
	animation: slideInUp 0.5s ease forwards;
	opacity: 0;
}

.cart-success-popup.show .cart-success-actions > *:nth-child(1) {
	animation-delay: 0.2s;
}

.cart-success-popup.show .cart-success-actions > *:nth-child(2) {
	animation-delay: 0.3s;
}

.cart-success-popup.show .cart-success-actions > *:nth-child(3) {
	animation-delay: 0.4s;
}

/* ===== ESTADOS DE LOADING ===== */
.cart-success-popup .cart-success-actions button[disabled],
.cart-success-popup .cart-success-actions a[disabled] {
	opacity: 0.6;
	pointer-events: none;
	cursor: not-allowed;
}

/* ===== ACESSIBILIDADE ===== */
.cart-success-popup:focus-within {
	outline: none;
}

.cart-success-close:focus,
.cart-success-continue:focus,
.cart-success-view-cart:focus,
.cart-success-checkout:focus {
	outline: 2px solid #8b6b9b;
	outline-offset: 2px;
}

.toast-close:focus {
	outline: 2px solid #22c55e;
	outline-offset: 2px;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
	.cart-success-content {
		background: #1e293b;
		color: #f1f5f9;
		box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
	}

	.cart-success-header {
		background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
		border-bottom-color: #475569;
	}

	.cart-success-header h3 {
		color: #f1f5f9;
	}

	.cart-success-message {
		color: #cbd5e1;
	}

	.cart-success-quantity {
		color: #94a3b8;
	}

	.toast {
		background: #1e293b;
		color: #f1f5f9;
		box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	}

	.toast-title {
		color: #f1f5f9;
	}

	.toast-message {
		color: #cbd5e1;
	}
}
