/* Modern Toastr Styles */

:root {
    --toastr-success: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --toastr-error: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --toastr-warning: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    --toastr-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

#toast-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
}

#toast-container * {
    box-sizing: border-box;
}

#toast-container > div {
    position: relative;
    pointer-events: auto;
    overflow: hidden;
    margin: 0 0 12px;
    padding: 18px 24px 18px 65px;
    width: 380px;
    border-radius: 16px;
    background-position: 20px center;
    background-repeat: no-repeat;
    background-size: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(400px);
    backdrop-filter: blur(10px);
    animation-delay: 0s;
    animation-duration: 3s;
}

#toast-container > div.rtl {
    direction: rtl;
    padding: 18px 65px 18px 24px;
    background-position: right 20px center;
}

#toast-container > div:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px) !important;
    cursor: pointer;
}

#toast-container > .toast-info {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
    background: var(--toastr-info);
}

#toast-container > .toast-error {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
    background: var(--toastr-error);
}

#toast-container > .toast-success {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background: var(--toastr-success);
}

#toast-container > .toast-warning {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E");
    background: var(--toastr-warning);
}

#toast-container > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    pointer-events: none;
}

#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div {
    width: 380px;
    margin-left: auto;
    margin-right: auto;
}

#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div {
    width: 96%;
    margin-left: auto;
    margin-right: auto;
}

.toast-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toast-message {
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
}

.toast-message a,
.toast-message label {
    color: #ffffff;
    text-decoration: underline;
}

.toast-message a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.toast-close-button {
    position: relative;
    right: -0.3em;
    top: -0.3em;
    float: right;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    opacity: 0.7;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.toast-close-button:hover,
.toast-close-button:focus {
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    opacity: 1;
    transform: scale(1.2);
}

.rtl .toast-close-button {
    left: -0.3em;
    float: left;
    right: 0.3em;
}

button.toast-close-button {
    padding: 0;
    cursor: pointer;
    background: transparent;
    border: 0;
    appearance: none;
}

.toast-top-center {
    top: 20px;
    right: 0;
    width: 100%;
}

.toast-bottom-center {
    bottom: 20px;
    right: 0;
    width: 100%;
}

.toast-top-full-width {
    top: 20px;
    right: 0;
    width: 100%;
}

.toast-bottom-full-width {
    bottom: 20px;
    right: 0;
    width: 100%;
}

.toast-top-left {
    top: 20px;
    left: 20px;
}

.toast-top-right {
    top: 20px;
    right: 20px;
}

.toast-bottom-right {
    right: 20px;
    bottom: 20px;
}

.toast-bottom-left {
    bottom: 20px;
    left: 20px;
}

#toast-container {
    pointer-events: none;
}

#toast-container > div {
    pointer-events: auto;
}

#toast-container > div.toast-info:hover {
    box-shadow: 0 15px 50px rgba(79, 172, 254, 0.4);
}

#toast-container > div.toast-error:hover {
    box-shadow: 0 15px 50px rgba(245, 85, 108, 0.4);
}

#toast-container > div.toast-success:hover {
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.4);
}

#toast-container > div.toast-warning:hover {
    box-shadow: 0 15px 50px rgba(255, 167, 38, 0.4);
}

.toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.4);
    opacity: 1;
    border-radius: 0 0 16px 16px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

#toast-container > div {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
}

#toast-container > div.ng-leave-active {
    animation: fadeOut 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.5s;
    animation-fill-mode: forwards;
}

/* Responsive */
@media all and (max-width: 240px) {
    #toast-container > div {
        padding: 14px 18px 14px 55px;
        width: 100%;
    }
    
    #toast-container > div.rtl {
        padding: 14px 55px 14px 18px;
    }
    
    #toast-container .toast-close-button {
        right: -0.2em;
        top: -0.2em;
    }
    
    #toast-container .rtl .toast-close-button {
        left: -0.2em;
        right: 0.2em;
    }
}

@media all and (min-width: 241px) and (max-width: 480px) {
    #toast-container > div {
        padding: 16px 20px 16px 60px;
        width: 100%;
    }
    
    #toast-container > div.rtl {
        padding: 16px 60px 16px 20px;
    }
    
    #toast-container .toast-close-button {
        right: -0.2em;
        top: -0.2em;
    }
    
    #toast-container .rtl .toast-close-button {
        left: -0.2em;
        right: 0.2em;
    }
}

@media all and (min-width: 481px) and (max-width: 768px) {
    #toast-container > div {
        padding: 18px 22px 18px 65px;
        width: 360px;
    }
    
    #toast-container > div.rtl {
        padding: 18px 65px 18px 22px;
    }
}

/* Special states */
#toast-container > div:active {
    transform: scale(0.98);
}

#toast-container.toast-bottom-center > div,
#toast-container.toast-top-center > div {
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
}

#toast-container.toast-bottom-full-width > div,
#toast-container.toast-top-full-width > div {
    width: calc(100% - 40px);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Enhanced visual effects */
#toast-container > div::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Blur effect for modern browsers */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    #toast-container > div {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

/* Custom close button design */
.toast-close-button::before {
    content: '';
    display: inline-block;
    font-family: Arial, sans-serif;
    font-weight: 300;
}
