/**
 * Toast Notification System Styles
 * Modern, Beautiful, Responsive
 */

/* Container */
.toast-container {
    position: fixed;
    top: 100px; /* Desktop: navbar 80px + 20px spacing */
    right: 20px;
    z-index: 999999; /* Must be higher than navbar (99999) */
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    width: auto;
    max-width: 500px;
}

/* Responsive Adjustments - Follow navbar height changes */

/* Tablet (≤991px, >767px) - navbar 60px */
@media (max-width: 991px) {
    .toast-container {
        top: 80px; /* 60px + 20px spacing */
    }
}

/* Small Screens (≤767px) - navbar 50px */
@media (max-width: 767px) {
    .toast-container {
        top: 70px; /* 50px + 20px spacing */
        right: 15px;
        max-width: calc(100vw - 30px);
    }
}

/* Smaller Screens (≤480px) - navbar 45px */
@media (max-width: 480px) {
    .toast-container {
        top: 60px; /* 45px + 15px spacing */
        right: 10px;
        max-width: calc(100vw - 20px);
    }
}

/* Extra Small Screens (≤360px) - navbar 40px */
@media (max-width: 360px) {
    .toast-container {
        top: 55px; /* 40px + 15px spacing */
        right: 10px;
        max-width: calc(100vw - 20px);
    }
}

/* Toast Element Mobile Optimization */

/* Small Screens (≤767px) */
@media (max-width: 767px) {
    .brygg-toast {
        min-width: 280px;
        max-width: calc(100vw - 30px);
        padding: 14px 18px;
        font-size: 13px;
    }
    
    .brygg-toast-icon {
        font-size: 18px;
        min-width: 18px;
    }
    
    .brygg-toast-close {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
}

/* Smaller Screens (≤480px) */
@media (max-width: 480px) {
    .brygg-toast {
        min-width: 260px;
        max-width: calc(100vw - 20px);
        padding: 12px 16px;
        font-size: 12px;
        gap: 10px;
    }
    
    .brygg-toast-icon {
        font-size: 16px;
        min-width: 16px;
    }
    
    .brygg-toast-close {
        width: 22px;
        height: 22px;
        font-size: 14px;
    }
}

/* Extra Small Screens (≤360px) */
@media (max-width: 360px) {
    .brygg-toast {
        min-width: 240px;
        max-width: calc(100vw - 20px);
        padding: 10px 14px;
        font-size: 11px;
        gap: 8px;
    }
    
    .brygg-toast-icon {
        font-size: 14px;
        min-width: 14px;
    }
    
    .brygg-toast-close {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
}

/* Toast Base Styles - Using brygg-toast prefix to avoid Bootstrap conflicts */
.brygg-toast {
    position: relative;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 
                0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'League Spartan', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Show Animation */
.brygg-toast-show {
    opacity: 1;
    transform: translateX(0);
}

/* Hide Animation */
.brygg-toast-hide {
    opacity: 0;
    transform: translateX(400px) scale(0.9);
}

/* Icon Container */
.brygg-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Message Text */
.brygg-toast-message {
    flex: 1;
    color: #333;
    font-weight: 500;
}

/* Close Button */
.brygg-toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
    opacity: 0.6;
}

.brygg-toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    opacity: 1;
}

.brygg-toast-close:active {
    transform: scale(0.95);
}

/* Success Toast */
.brygg-toast-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.brygg-toast-success .brygg-toast-icon {
    color: #28a745;
}

.brygg-toast-success .brygg-toast-message {
    color: #155724;
}

/* Error Toast */
.brygg-toast-error {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    border-left: 4px solid #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2), 
                0 0 0 1px rgba(220, 53, 69, 0.1);
}

.brygg-toast-error .brygg-toast-icon {
    color: #dc3545;
}

.brygg-toast-error .brygg-toast-message {
    color: #721c24;
    font-weight: 500;
}

/* Warning Toast */
.brygg-toast-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
}

.brygg-toast-warning .brygg-toast-icon {
    color: #f39c12;
}

.brygg-toast-warning .brygg-toast-message {
    color: #856404;
}

/* Info Toast */
.brygg-toast-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-left: 4px solid #17a2b8;
}

.brygg-toast-info .brygg-toast-icon {
    color: #17a2b8;
}

.brygg-toast-info .brygg-toast-message {
    color: #0c5460;
}


/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .brygg-toast {
        background: #2d2d30;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 
                    0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    
    .brygg-toast-message {
        color: #e0e0e0;
    }
    
    .brygg-toast-close {
        color: #999;
    }
    
    .brygg-toast-close:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* Success - Dark Mode */
    .brygg-toast-success {
        background: linear-gradient(135deg, #1e3a28 0%, #2d5a3f 100%);
        border-left-color: #4caf50;
    }
    
    .brygg-toast-success .brygg-toast-icon {
        color: #4caf50;
    }
    
    .brygg-toast-success .brygg-toast-message {
        color: #a5d6a7;
    }
    
    /* Error - Dark Mode */
    .brygg-toast-error {
        background: linear-gradient(135deg, #3a1e1e 0%, #5a2d2d 100%);
        border-left-color: #f44336;
        box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3), 
                    0 0 0 1px rgba(244, 67, 54, 0.2);
    }
    
    .brygg-toast-error .brygg-toast-icon {
        color: #f44336;
    }
    
    .brygg-toast-error .brygg-toast-message {
        color: #ef9a9a;
        font-weight: 500;
    }
    
    /* Warning - Dark Mode */
    .brygg-toast-warning {
        background: linear-gradient(135deg, #3a3a1e 0%, #5a5a2d 100%);
        border-left-color: #ff9800;
    }
    
    .brygg-toast-warning .brygg-toast-icon {
        color: #ff9800;
    }
    
    .brygg-toast-warning .brygg-toast-message {
        color: #ffcc80;
    }
    
    /* Info - Dark Mode */
    .brygg-toast-info {
        background: linear-gradient(135deg, #1e2a3a 0%, #2d405a 100%);
        border-left-color: #2196f3;
    }
    
    .brygg-toast-info .brygg-toast-icon {
        color: #2196f3;
    }
    
    .brygg-toast-info .brygg-toast-message {
        color: #90caf9;
    }
}

/* Hide when printing */
@media print {
    .toast-container {
        display: none !important;
    }
}

