/* ======================================
   GOUABOSHOP - ENHANCED NOTIFICATIONS
   ====================================== */

/* ========== NOTIFICATION CONTAINER ========== */

[aria-live="polite"],
[aria-live="assertive"] {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1080;
    pointer-events: none;
}

[aria-live="polite"] *,
[aria-live="assertive"] * {
    pointer-events: auto;
}

/* ========== TOAST STYLING ========== */

.toast {
    min-width: 320px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, currentColor, transparent);
    animation: slideInLeft 0.4s ease;
}

/* ========== TOAST VARIANTS ========== */

/* Success Toast */
.toast.bg-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
    color: #fff !important;
}

.toast.bg-success::before {
    background: linear-gradient(90deg, #fff, transparent);
}

.toast.bg-success .toast-body {
    color: #fff !important;
    font-weight: 600;
}

.toast.bg-success .btn-close {
    opacity: 0.8;
}

.toast.bg-success .btn-close:hover {
    opacity: 1;
}

/* Danger Toast */
.toast.bg-danger {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%) !important;
    color: #fff !important;
}

.toast.bg-danger::before {
    background: linear-gradient(90deg, #fff, transparent);
}

.toast.bg-danger .toast-body {
    color: #fff !important;
    font-weight: 600;
}

.toast.bg-danger .btn-close {
    opacity: 0.8;
}

.toast.bg-danger .btn-close:hover {
    opacity: 1;
}

/* Warning Toast */
.toast.bg-warning {
    background: linear-gradient(135deg, #ff9800 0%, #fb8c00 100%) !important;
    color: #fff !important;
}

.toast.bg-warning::before {
    background: linear-gradient(90deg, #fff, transparent);
}

.toast.bg-warning .toast-body {
    color: #fff !important;
    font-weight: 600;
}

.toast.bg-warning .btn-close {
    opacity: 0.8;
}

.toast.bg-warning .btn-close:hover {
    opacity: 1;
}

/* Info Toast */
.toast.bg-info {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%) !important;
    color: #fff !important;
}

.toast.bg-info::before {
    background: linear-gradient(90deg, #fff, transparent);
}

.toast.bg-info .toast-body {
    color: #fff !important;
    font-weight: 600;
}

.toast.bg-info .btn-close {
    opacity: 0.8;
}

.toast.bg-info .btn-close:hover {
    opacity: 1;
}

/* Primary Toast */
.toast.bg-primary {
    background: linear-gradient(135deg, #4C7A4A 0%, #3a5f39 100%) !important;
    color: #fff !important;
}

.toast.bg-primary::before {
    background: linear-gradient(90deg, #fff, transparent);
}

.toast.bg-primary .toast-body {
    color: #fff !important;
    font-weight: 600;
}

.toast.bg-primary .btn-close {
    opacity: 0.8;
}

.toast.bg-primary .btn-close:hover {
    opacity: 1;
}

/* ========== TOAST CONTENT ========== */

.toast-body {
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-body::before {
    content: '';
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.toast.bg-success .toast-body::before {
    content: '✓';
    color: #fff;
}

.toast.bg-danger .toast-body::before {
    content: '✕';
    color: #fff;
}

.toast.bg-warning .toast-body::before {
    content: '⚠';
    color: #fff;
}

.toast.bg-info .toast-body::before {
    content: 'ℹ';
    color: #fff;
}

.toast.bg-primary .toast-body::before {
    content: '→';
    color: #fff;
}

/* ========== TOAST CLOSE BUTTON ========== */

.btn-close {
    padding: 0;
    background: transparent !important;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    width: auto;
    height: auto;
}

.btn-close:hover {
    opacity: 1;
}

.btn-close-white {
    filter: brightness(1) !important;
}

/* ========== ANIMATION - SLIDE IN RIGHT ========== */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(400px) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotateY(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0) rotateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px) rotateY(-90deg);
    }
}

/* ========== ANIMATION - HIDE TOAST ========== */

.toast.hide {
    animation: slideOutRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ========== PROGRESS BAR ========== */

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    animation: progressBar 5s linear;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* ========== ALERT NOTIFICATIONS ========== */

.alert {
    border-radius: 12px;
    border-left: 4px solid;
    animation: slideInDown 0.4s ease;
    margin-bottom: 20px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 20px;
    font-weight: bold;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 15px;
}

.alert-message {
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.5;
}

/* ========== ALERT VARIANTS ========== */

.alert-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border-left-color: #4CAF50;
    color: #2e7d32;
}

.alert-success .alert-icon {
    color: #4CAF50;
}

.alert-success .alert-title {
    color: #1b5e20;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(244, 67, 54, 0.05));
    border-left-color: #f44336;
    color: #c62828;
}

.alert-danger .alert-icon {
    color: #f44336;
}

.alert-danger .alert-title {
    color: #b71c1c;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 152, 0, 0.05));
    border-left-color: #ff9800;
    color: #e65100;
}

.alert-warning .alert-icon {
    color: #ff9800;
}

.alert-warning .alert-title {
    color: #e65100;
}

.alert-info {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.05));
    border-left-color: #2196F3;
    color: #0d47a1;
}

.alert-info .alert-icon {
    color: #2196F3;
}

.alert-info .alert-title {
    color: #1565c0;
}

/* ========== CLOSE BUTTON FOR ALERTS ========== */

.alert .btn-close {
    align-self: flex-start;
    margin-top: 2px;
}

/* ========== NOTIFICATION WRAPPER ========== */

.notification-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInUp 0.4s ease;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

/* ========== INLINE NOTIFICATIONS ========== */

.inline-notification {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 3px solid;
    animation: slideInLeft 0.3s ease;
}

.inline-notification.success {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4CAF50;
    color: #2e7d32;
}

.inline-notification.danger {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: #f44336;
    color: #c62828;
}

.inline-notification.warning {
    background: rgba(255, 152, 0, 0.1);
    border-left-color: #ff9800;
    color: #e65100;
}

.inline-notification.info {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: #2196F3;
    color: #0d47a1;
}

/* ========== BANNER NOTIFICATIONS ========== */

.notification-banner {
    width: 100%;
    padding: 16px 20px;
    border-radius: 0;
    animation: slideInDown 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 0;
}

.notification-banner.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
}

.notification-banner.danger {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
    color: #fff;
}

.notification-banner.warning {
    background: linear-gradient(135deg, #ff9800 0%, #fb8c00 100%);
    color: #fff;
}

.notification-banner.info {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: #fff;
}

.notification-banner .btn-close {
    opacity: 0.8;
}

.notification-banner .btn-close:hover {
    opacity: 1;
}

/* ========== FLOATING NOTIFICATIONS ========== */

.floating-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    padding: 20px;
    animation: slideInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    border-left: 4px solid;
}

.floating-notification.success {
    border-left-color: #4CAF50;
}

.floating-notification.danger {
    border-left-color: #f44336;
}

.floating-notification.warning {
    border-left-color: #ff9800;
}

.floating-notification.info {
    border-left-color: #2196F3;
}

.floating-notification-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #2c3e50;
}

.floating-notification-message {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
}

/* ========== NOTIFICATION ANIMATIONS ========== */

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 576px) {
    [aria-live="polite"],
    [aria-live="assertive"] {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    .floating-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .notification-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========== NOTIFICATION PULSE ========== */

@keyframes notificationPulse {
    0%, 100% {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    }
}

.toast.pulse {
    animation: notificationPulse 2s ease;
}

/* ========== STACKED NOTIFICATIONS ========== */

.toast:nth-child(1) {
    animation-delay: 0s;
}

.toast:nth-child(2) {
    animation-delay: 0.1s;
}

.toast:nth-child(3) {
    animation-delay: 0.2s;
}

.toast:nth-child(4) {
    animation-delay: 0.3s;
}

.toast:nth-child(5) {
    animation-delay: 0.4s;
}
