/* ============================================
   MIRACOLLO TOAST SYSTEM
   Apple-style toast notifications
   
   @version 1.0.0
   @date 2025-12-25
   @author Cervella 🧠
   ============================================ */

/* ========== TOAST CONTAINER ========== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: var(--z-toast, 3000);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    /* Allow clicks through container */
}

/* ========== TOAST ========== */
.toast {
    pointer-events: all;
    /* Re-enable clicks on toast */
    background: var(--bg-secondary, #1a1a1a);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    min-width: 300px;
    max-width: 400px;
    box-shadow: var(--shadow-lg, 0 10px 15px rgba(0, 0, 0, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ========== TOAST TYPES ========== */
.toast--success {
    border-left: 3px solid var(--status-paid, #22c55e);
}

.toast--error {
    border-left: 3px solid var(--status-pending, #ef4444);
}

.toast--warning {
    border-left: 3px solid var(--status-unpaid, #f97316);
}

.toast--info {
    border-left: 3px solid var(--accent-primary, #6366f1);
}

/* ========== TOAST ICON ========== */
.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.toast--success .toast-icon {
    background: rgba(34, 197, 94, 0.2);
    color: var(--status-paid, #22c55e);
}

.toast--error .toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--status-pending, #ef4444);
}

.toast--warning .toast-icon {
    background: rgba(249, 115, 22, 0.2);
    color: var(--status-unpaid, #f97316);
}

.toast--info .toast-icon {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary, #6366f1);
}

/* ========== TOAST MESSAGE ========== */
.toast-message {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary, #ffffff);
    line-height: 1.4;
}

/* ========== TOAST CLOSE BUTTON ========== */
.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted, #666666);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #ffffff);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
    }

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

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: none;
    }
}