/**
 * Toast Notifications - Obaveštenja
 */

/* ==========================================
   TOAST CONTAINER
   ========================================== */
.toast-container {
    position: fixed;
    top: 100px;
    top: calc(100px + env(safe-area-inset-top, 0px));
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

@media (max-width: 480px) {
    .toast-container {
        left: 16px;
        right: 16px;
        top: 90px;
        top: calc(90px + env(safe-area-inset-top, 0px));
        max-width: none;
    }
}

/* ==========================================
   TOAST
   ========================================== */
.toast {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    animation: slideInFromRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast i:first-child {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast span {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.toast__close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    margin: -4px;
    transition: color 0.3s ease;
}

.toast__close:hover {
    color: var(--text-primary);
}

/* ==========================================
   TOAST TYPES
   ========================================== */
.toast--success {
    border-left: 4px solid var(--success);
}

.toast--success i:first-child {
    color: var(--success);
}

.toast--error {
    border-left: 4px solid var(--danger);
}

.toast--error i:first-child {
    color: var(--danger);
}

.toast--warning {
    border-left: 4px solid var(--warning);
}

.toast--warning i:first-child {
    color: var(--warning);
}

.toast--info {
    border-left: 4px solid var(--info);
}

.toast--info i:first-child {
    color: var(--info);
}

/* ==========================================
   TOAST WITH ACTION
   ========================================== */
.toast--with-action {
    flex-direction: column;
}

.toast__actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.toast__action {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.toast__action--primary {
    background: var(--primary);
    color: white;
    border: none;
}

.toast__action--primary:hover {
    background: var(--primary-dark);
}

.toast__action--secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.toast__action--secondary:hover {
    background: var(--bg-secondary);
}
