/**
 * GastroExperience Toast Component
 * Based on Accunity toast system with same design and functionality
 */

/* Toast Container */
.gastroexperience-toast-container {
	position: fixed;
	top: 45px;
	right: 20px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 350px;
	width: 100%;
	margin: 0;
	padding: 0;
}

/* Toast */
.gastroexperience-toast {
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
	border: none;
	border-left: 3px solid #ddd;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(20px);
	transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
	margin: 0 !important;
	padding: 0 !important;
}

.gastroexperience-toast.showing {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.gastroexperience-toast.hiding {
	opacity: 0;
	transform: translateY(-20px);
	transition: all 0.2s ease-in;
}

/* Toast Content */
.gastroexperience-toast-content {
	display: flex;
	align-items: center;
	padding: 16px;
	position: relative;
	z-index: 1;
	background: #fff;
	min-height: auto;
}

/* Toast Icon */
.gastroexperience-toast-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	margin-right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gastroexperience-toast-svg {
	width: 24px;
	height: 24px;
}

/* Show only the path for the current toast type */
.gastroexperience-toast-svg path {
	display: none;
}

.gastroexperience-toast-success .gastroexperience-toast-svg path.gastroexperience-toast-success,
.gastroexperience-toast-error .gastroexperience-toast-svg path.gastroexperience-toast-error,
.gastroexperience-toast-warning .gastroexperience-toast-svg path.gastroexperience-toast-warning,
.gastroexperience-toast-info .gastroexperience-toast-svg path.gastroexperience-toast-info,
.gastroexperience-toast-loading .gastroexperience-toast-svg path.gastroexperience-toast-loading {
	display: block;
	fill: currentColor;
}

.gastroexperience-toast-success .gastroexperience-toast-icon {
	color: #28a745;
}

.gastroexperience-toast-error .gastroexperience-toast-icon {
	color: #dc3545;
}

.gastroexperience-toast-warning .gastroexperience-toast-icon {
	color: #ffc107;
}

.gastroexperience-toast-info .gastroexperience-toast-icon {
	color: #17a2b8;
}

.gastroexperience-toast-loading .gastroexperience-toast-icon {
	color: #6c757d;
	animation: gastroexperience-rotate 1.5s linear infinite;
}

@keyframes gastroexperience-rotate {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

/* Toast Types */
.gastroexperience-toast.gastroexperience-toast-success {
	border-left-color: #28a745;
}

.gastroexperience-toast.gastroexperience-toast-error {
	border-left-color: #dc3545;
}

.gastroexperience-toast.gastroexperience-toast-warning {
	border-left-color: #ffc107;
}

.gastroexperience-toast.gastroexperience-toast-info {
	border-left-color: #17a2b8;
}

.gastroexperience-toast.gastroexperience-toast-loading {
	border-left-color: #6c757d;
}

/* Toast Message */
.gastroexperience-toast-message {
	flex: 1;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
	margin: 0;
	padding-right: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Close Button */
.gastroexperience-toast-close {
	background: none !important;
	border: none;
	padding: 0 !important;
	margin: 0 0 0 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999 !important;
	transition: color 0.2s ease;
	opacity: 0.6;
}

.gastroexperience-toast-close:hover {
	opacity: 1 !important;
	color: #333 !important;
	background: transparent !important;
}

.gastroexperience-toast-close svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	transition: all ease-in-out 0.2s;
}

/* Progress Bar */
.gastroexperience-toast-progress {
	height: 3px;
	background: rgba(0, 0, 0, 0.1);
	width: 100%;
	transform-origin: left;
	transform: scaleX(1);
	transition: transform linear;
}

.gastroexperience-toast-progress-bar {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 100%;
	transition-property: width;
	transition-timing-function: linear;
	transform: translateZ(0);
}

/* Progress bar colors */
.gastroexperience-toast.gastroexperience-toast-success .gastroexperience-toast-progress-bar {
	background: #28a745;
}

.gastroexperience-toast.gastroexperience-toast-error .gastroexperience-toast-progress-bar {
	background: #dc3545;
}

.gastroexperience-toast.gastroexperience-toast-warning .gastroexperience-toast-progress-bar {
	background: #ffc107;
}

.gastroexperience-toast.gastroexperience-toast-info .gastroexperience-toast-progress-bar {
	background: #17a2b8;
}

.gastroexperience-toast.gastroexperience-toast-loading .gastroexperience-toast-progress-bar {
	background: #6c757d;
}

/* Responsive */
@media (max-width: 480px) {
	.gastroexperience-toast-container {
		left: 16px;
		right: 16px;
		max-width: 100%;
		padding: 0;
	}
}