/* ===== Modern Toast Notification ===== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 420px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

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

.toast-success {
    border-left: 5px solid #10b981;
}

.toast-error {
    border-left: 5px solid #ef4444;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.toast-error .toast-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    border-radius: 0 0 0 12px;
    animation: progress 4s linear forwards;
}

.toast-success .toast-progress {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.toast-error .toast-progress {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* ===== Modern Button Spinner ===== */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-modern:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-modern .btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-modern.loading .btn-text {
    opacity: 0;
    transform: translateY(20px);
}

.modern-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.btn-modern.loading .modern-spinner {
    opacity: 1;
    visibility: visible;
}

.spinner-dots {
    display: flex;
    gap: 6px;
}

.spinner-dots span {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.spinner-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.spinner-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Alternative: Circle Spinner */
.spinner-circle {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pulse effect on button */
.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:active::before {
    width: 300px;
    height: 300px;
}

/* Warning Toast - Already added, but confirm these are present */
.toast-warning {
    border-left: 5px solid #f59e0b;
}

.toast-warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.toast-warning .toast-progress {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .toast-container {
        left: 15px;
        right: 15px;
        bottom: 20px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}