/**
 * Toast Notification System Styles
 * Modern, animated toast notifications
 */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Individual Toast */
.custom-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.custom-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Toast Icon */
.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 14px;
}

/* Toast Content */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
    color: inherit;
}

.toast-message {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Toast Close Button */
.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
    color: inherit;
}

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

/* Toast Types */
.custom-toast.toast-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.95) 0%, rgba(32, 201, 151, 0.95) 100%);
    color: #fff;
}

.custom-toast.toast-success .toast-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.custom-toast.toast-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.95) 0%, rgba(185, 43, 39, 0.95) 100%);
    color: #fff;
}

.custom-toast.toast-error .toast-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.custom-toast.toast-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95) 0%, rgba(255, 152, 0, 0.95) 100%);
    color: #1a1a2e;
}

.custom-toast.toast-warning .toast-icon {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

.custom-toast.toast-info {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.95) 0%, rgba(0, 82, 163, 0.95) 100%);
    color: #fff;
}

.custom-toast.toast-info .toast-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 12px 12px;
    animation: toastProgress linear forwards;
}

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

/* Dark Mode Support */
.dark-mode .custom-toast {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 576px) {
    .toast-container {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
    }
    
    .custom-toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.5);
}

.scroll-to-top:active {
    transform: translateY(0);
}

.scroll-to-top i {
    transition: transform 0.2s;
}

.scroll-to-top:hover i {
    transform: translateY(-2px);
}

/* Pulse animation for scroll button */
.scroll-to-top::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    opacity: 0;
    animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Dark mode scroll button */
.dark-mode .scroll-to-top {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.dark-mode .scroll-to-top:hover {
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
}

@media (max-width: 576px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}
