/* Toast Notification System - Pico CSS Compatible */

/* Toast container - fixed position at top right */
.notify-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

/* Individual toast */
.notify-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    background: var(--pico-card-background-color, #fff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: notify-slide-in 0.3s ease-out;
    max-width: 100%;
}

.notify-toast.hiding {
    animation: notify-slide-out 0.3s ease-in forwards;
}

/* Toast icon */
.notify-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Toast content */
.notify-toast-content {
    flex: 1;
    min-width: 0;
}

.notify-toast-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Toast close button */
.notify-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.5;
    font-size: 18px;
    line-height: 1;
    color: inherit;
}

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

/* Toast types */
.notify-toast.success {
    border-left: 4px solid #10b981;
}

.notify-toast.success .notify-toast-icon {
    color: #10b981;
}

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

.notify-toast.error .notify-toast-icon {
    color: #ef4444;
}

.notify-toast.warning {
    border-left: 4px solid #f59e0b;
}

.notify-toast.warning .notify-toast-icon {
    color: #f59e0b;
}

.notify-toast.info {
    border-left: 4px solid #3b82f6;
}

.notify-toast.info .notify-toast-icon {
    color: #3b82f6;
}

/* Animations */
@keyframes notify-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notify-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Confirmation Modal */
.notify-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: notify-fade-in 0.2s ease-out;
}

.notify-modal-overlay.hiding {
    animation: notify-fade-out 0.2s ease-in forwards;
}

.notify-modal {
    background: var(--pico-card-background-color, #fff);
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: notify-scale-in 0.2s ease-out;
}

.notify-modal-overlay.hiding .notify-modal {
    animation: notify-scale-out 0.2s ease-in forwards;
}

.notify-modal-message {
    margin: 0 0 24px 0;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

.notify-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.notify-modal-actions button {
    min-width: 100px;
    margin: 0;
}

@keyframes notify-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes notify-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes notify-scale-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes notify-scale-out {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.9);
        opacity: 0;
    }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .notify-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .notify-toast {
        padding: 12px;
    }

    .notify-modal {
        width: 95%;
        padding: 20px;
    }

    .notify-modal-actions {
        flex-direction: column;
    }

    .notify-modal-actions button {
        width: 100%;
    }
}
