/**
 * Facebook-style Toast Notifications
 * Hiển thị thông báo khi có hành động thành công
 */

.myshop-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.myshop-notification {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    animation: myshop-notification-slide-in 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.myshop-notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--notification-color, #42b883);
}

.myshop-notification.success::before {
    background: #42b883;
}

.myshop-notification.info::before {
    background: #1877f2;
}

.myshop-notification.warning::before {
    background: #f39c12;
}

.myshop-notification.error::before {
    background: #e74c3c;
}

@keyframes myshop-notification-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes myshop-notification-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.myshop-notification.hiding {
    animation: myshop-notification-slide-out 0.3s ease-in forwards;
}

.myshop-notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    background: var(--notification-color, #42b883);
}

.myshop-notification.success .myshop-notification-icon {
    background: #42b883;
}

.myshop-notification.info .myshop-notification-icon {
    background: #1877f2;
}

.myshop-notification.warning .myshop-notification-icon {
    background: #f39c12;
}

.myshop-notification.error .myshop-notification-icon {
    background: #e74c3c;
}

.myshop-notification-content {
    flex: 1;
    min-width: 0;
}

.myshop-notification-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    color: #050505;
    margin: 0 0 4px 0;
}

.myshop-notification-message {
    font-size: 13px;
    line-height: 1.4;
    color: #65676b;
    margin: 0;
}

.myshop-notification-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a8d91;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
}

.myshop-notification-close:hover {
    color: #050505;
}

.myshop-notification-close::before {
    content: '×';
    font-size: 24px;
    font-weight: 300;
}

.myshop-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.myshop-notification-progress-bar {
    height: 100%;
    background: var(--notification-color, #42b883);
    animation: myshop-notification-progress linear forwards;
}

.myshop-notification.success .myshop-notification-progress-bar {
    background: #42b883;
}

.myshop-notification.info .myshop-notification-progress-bar {
    background: #1877f2;
}

@keyframes myshop-notification-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .myshop-notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .myshop-notification {
        min-width: auto;
        max-width: none;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .myshop-notification {
        background: #242526;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    .myshop-notification-title {
        color: #e4e6eb;
    }

    .myshop-notification-message {
        color: #b0b3b8;
    }

    .myshop-notification-close {
        color: #b0b3b8;
    }

    .myshop-notification-close:hover {
        color: #e4e6eb;
    }
}

