﻿#toast-container > div {
    background: var(--container-bg);
    border: 1px solid rgba(123, 182, 120, 0.2);
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 1rem 1.25rem;
    margin: 0 0 0.75rem 0;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: none !important;
}

#toast-container > div.toast {
    opacity: 1;
    transform: translateX(0);
}

#toast-container > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    z-index: 1;
}

#toast-container > .toast-success {
    border-color: rgba(40, 167, 69, 0.3);
    background: var(--container-bg);
    background-image: none !important; 
}

#toast-container > .toast-success::before {
    background: linear-gradient(90deg, #28a745, #20c997);
}

#toast-container > .toast-success .toast-icon {
    color: #28a745;
}

#toast-container > .toast-error {
    border-color: rgba(220, 53, 69, 0.3);
    background: var(--container-bg);
    background-image: none !important; 
}

#toast-container > .toast-error::before {
    background: linear-gradient(90deg, #dc3545, #fd7e14);
}

#toast-container > .toast-error .toast-icon {
    color: #dc3545;
}

#toast-container > .toast-warning {
    border-color: rgba(255, 193, 7, 0.3);
    background: var(--container-bg);
    background-image: none !important; 
}

#toast-container > .toast-warning::before {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

#toast-container > .toast-warning .toast-icon {
    color: #ffc107;
}

#toast-container > .toast-info {
    border-color: rgba(23, 162, 184, 0.3);
    background: var(--container-bg);
    background-image: none !important;
}

#toast-container > .toast-info::before {
    background: linear-gradient(90deg, #17a2b8, #6f42c1);
}

#toast-container > .toast-info .toast-icon {
    color: #17a2b8;
}

#toast-container > div .toast-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#toast-container > div .toast-message {
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.4;
    margin: 0;
}

#toast-container > div .toast-close-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-color);
    opacity: 0.6;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toast-container > div .toast-close-button:hover {
    opacity: 1;
    background: rgba(123, 182, 120, 0.1);
    transform: scale(1.1);
}

#toast-container > div .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(123, 182, 120, 0.3);
    border-radius: 0 0 0.75rem 0.75rem;
    transform-origin: left center;
}

#toast-container > .toast-success .toast-progress {
    background: rgba(40, 167, 69, 0.4);
}

#toast-container > .toast-error .toast-progress {
    background: rgba(220, 53, 69, 0.4);
}

#toast-container > .toast-warning .toast-progress {
    background: rgba(255, 193, 7, 0.4);
}

#toast-container > .toast-info .toast-progress {
    background: rgba(23, 162, 184, 0.4);
}

#toast-container > div.toast-closing {
    opacity: 0;
    transform: translateX(100%) scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 1, 1);
}

#toast-container {
    position: fixed;
    z-index: 9999;
}

#toast-container.toast-bottom-right {
    bottom: 1.5rem;
    right: 1.5rem;
}

#toast-container.toast-top-right {
    top: 1.5rem;
    right: 1.5rem;
}

#toast-container.toast-bottom-left {
    bottom: 1.5rem;
    left: 1.5rem;
}

#toast-container.toast-top-left {
    top: 1.5rem;
    left: 1.5rem;
}

@media (max-width: 768px) {
    #toast-container {
        left: 1rem !important;
        right: 1rem !important;
        width: auto !important;
    }

    #toast-container > div {
        min-width: unset;
        max-width: unset;
        width: 100%;
        margin: 0 0 0.5rem 0;
    }

    #toast-container.toast-bottom-right,
    #toast-container.toast-bottom-left {
        bottom: 1rem;
    }

    #toast-container.toast-top-right,
    #toast-container.toast-top-left {
        top: 1rem;
    }
}

@media (prefers-color-scheme: dark) {
    #toast-container > div {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

#toast-container > div:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    border-color: var(--accent-color);
}