/*
 * Enhanced Modern Toast Notifications for African Food San Diego
 * This file contains styles for the custom toast notification system
 */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 380px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none; /* Allow clicking through the container */
}

.toast-notification {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    transform: translateX(120%) translateY(0);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
    pointer-events: auto; /* Make the toast itself clickable */
    border-left: none;
    margin-bottom: 0;
    opacity: 0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Modern slide-in animation */
.toast-notification.show {
    transform: translateX(0) translateY(0);
    opacity: 1;
}

/* Modern slide-out animation */
.toast-notification.hide {
    transform: translateX(120%) translateY(0);
    opacity: 0;
}

/* Toast header with cleaner design */
.toast-header {
    align-items: center;
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    padding: 16px 20px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Modern typography for toast title */
.toast-title {
    color: #2E3A23;
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
}

/* Enhanced close button */
.toast-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* Toast body with improved spacing */
.toast-body {
    padding: 16px 20px;
    position: relative;
}

/* Message styling */
.toast-message {
    color: #555;
    font-size: 14px;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* Product section with enhanced styling */
.toast-product {
    align-items: center;
    display: flex;
    margin: 12px 0;
    padding: 10px;
    background-color: rgba(0, 135, 81, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.toast-product:hover {
    background-color: rgba(0, 135, 81, 0.1);
    transform: translateY(-2px);
}

/* Product image with enhanced styling */
.toast-product-image {
    border: none;
    border-radius: 10px;
    height: 60px;
    margin-right: 12px;
    object-fit: cover;
    width: 60px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.toast-product:hover .toast-product-image {
    transform: scale(1.05);
}

/* Product info section */
.toast-product-info {
    flex: 1;
}

/* Product name with enhanced typography */
.toast-product-name {
    color: #2E3A23;
    font-weight: 600;
    margin: 0 0 5px;
    font-size: 15px;
}

/* Product price with accent color */
.toast-product-price {
    color: #008751;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    display: inline-block;
    padding: 2px 8px;
    background-color: rgba(0, 135, 81, 0.1);
    border-radius: 20px;
}

/* Action buttons container */
.toast-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
    gap: 10px;
}

/* Modern button styling */
.toast-btn {
    background-color: transparent;
    border: 1px solid #008751;
    border-radius: 30px;
    color: #008751;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.toast-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #008751;
    transition: all 0.3s ease;
    z-index: -1;
}

.toast-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 135, 81, 0.2);
}

.toast-btn:hover::after {
    height: 100%;
}

/* Primary button styling */
.toast-btn-primary {
    background-color: #008751;
    color: white;
}

.toast-btn-primary:hover {
    background-color: #006B3C;
    box-shadow: 0 4px 12px rgba(0, 135, 81, 0.3);
}

/* Progress bar with gradient */
.toast-progress {
    background: linear-gradient(to right, #008751, #F7C600);
    bottom: 0;
    height: 3px;
    left: 0;
    position: absolute;
    width: 100%;
}

/* Toast types with modern styling */
/* Success toast */
.toast-notification.success {
    border-top: 3px solid #008751;
}

.toast-notification.success .toast-title {
    color: #008751;
}

.toast-notification.success .toast-progress {
    background: linear-gradient(to right, #008751, #20c997);
}

/* Error toast */
.toast-notification.error {
    border-top: 3px solid #dc3545;
}

.toast-notification.error .toast-title {
    color: #dc3545;
}

.toast-notification.error .toast-progress {
    background: linear-gradient(to right, #dc3545, #ff6b6b);
}

/* Info toast */
.toast-notification.info {
    border-top: 3px solid #0dcaf0;
}

.toast-notification.info .toast-title {
    color: #0dcaf0;
}

.toast-notification.info .toast-progress {
    background: linear-gradient(to right, #0dcaf0, #6610f2);
}

/* Enhanced animation for product image */
.toast-product-image {
    animation: gentlePulse 3s infinite;
}

@keyframes gentlePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
    100% {
        transform: scale(1);
    }
}

/* View indicator for clickable product */
.toast-view-indicator {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 12px;
    color: #008751;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(5px);
}

.toast-product:hover .toast-view-indicator {
    opacity: 1;
    transform: translateY(0);
}

/* Subtle pattern background */
.toast-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23008751' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .toast-container {
        max-width: 90%;
        right: 5%;
        left: 5%;
    }

    .toast-product-image {
        height: 50px;
        width: 50px;
    }

    .toast-actions {
        flex-wrap: wrap;
    }

    .toast-btn {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
        min-width: 100px;
    }
}
