/* Toast Notification Styles */

.toast-container {
    position: fixed !important;
    top: 24px !important;
    left: 50% !important;
    transform: translateX(-50%);
    width: min(440px, calc(100% - 32px));
    z-index: 20000 !important;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.toast {
    position: relative;
    width: 100%;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    margin-bottom: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
    animation: dropIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .toast {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.55);
}

.toast.toast-success { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: rgba(255, 255, 255, 0.2);
}
.toast.toast-error,
.toast.toast-danger { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(255, 255, 255, 0.2);
}
.toast.toast-warning { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: rgba(255, 255, 255, 0.2);
}
.toast.toast-info { 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .toast.toast-success,
[data-theme="dark"] .toast.toast-error,
[data-theme="dark"] .toast.toast-danger,
[data-theme="dark"] .toast.toast-warning,
[data-theme="dark"] .toast.toast-info {
    border-color: rgba(255, 255, 255, 0.15);
}

.toast.hiding {
    animation: dropOut 0.3s ease forwards;
}

@keyframes dropIn {
    from {
        transform: translateY(-20px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes dropOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(-10px) scale(0.96);
        opacity: 0;
    }
}

.toast-header {
    padding: 0.5rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    font-size: 0.875rem;
    background: transparent;
    border: none;
}

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    font-size: 1rem;
    color: white;
    background: rgba(255, 255, 255, 0.25);
}

.toast-title {
    flex: 1;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toast-body {
    flex: 1;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.825rem;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.15rem;
    line-height: 1;
    color: white;
    opacity: 0.7;
    cursor: pointer;
    padding: 0.2rem;
    margin-left: 0.5rem;
    transition: all 0.2s;
    border-radius: 6px;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.toast-progress {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    width: 100%;
    animation: progressBar linear forwards;
}

@keyframes progressBar {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* Mobile responsive */
@media (max-width: 576px) {
    .toast-container {
        top: 16px !important;
        transform: translateX(-50%);
        width: calc(100% - 24px);
    }
    
    .toast {
        width: 100%;
    }
}

/* Additional toast styles for different contexts */
.toast-compact .toast-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.toast-compact .toast-body {
    padding: 0.75rem;
    font-size: 0.875rem;
}

/* Toast with action buttons */
.toast-actions {
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.toast-action-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toast-action-btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.toast-action-btn.primary:hover {
    background-color: #3a5bc7;
}

.toast-action-btn.secondary {
    background-color: #e0e0e0;
    color: #333;
}

.toast-action-btn.secondary:hover {
    background-color: #d0d0d0;
}
